refs #5888 fix: refresh data
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
3073955517
commit
a7e6050250
|
@ -1,10 +1,10 @@
|
||||||
<vn-crud-model
|
<vn-crud-model
|
||||||
|
vn-id="getLocations"
|
||||||
auto-load="true"
|
auto-load="true"
|
||||||
url="Postcodes/location"
|
url="Postcodes/location"
|
||||||
data="$ctrl.locations"
|
data="$ctrl.locations"
|
||||||
order="code">
|
order="code">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
{{$ctrl.postCode}}
|
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-two
|
vn-two
|
||||||
vn-id="location"
|
vn-id="location"
|
||||||
|
@ -12,17 +12,16 @@
|
||||||
vn-name="location"
|
vn-name="location"
|
||||||
ng-model="$ctrl.postCode"
|
ng-model="$ctrl.postCode"
|
||||||
data="$ctrl.locations"
|
data="$ctrl.locations"
|
||||||
selection="$ctrl.selection"
|
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id">
|
value-field="id">
|
||||||
<tpl-item class="address">
|
<tpl-item class="address">
|
||||||
<span>
|
<span>
|
||||||
{{::name}}
|
{{name}}
|
||||||
</span>
|
</span>
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
<append>
|
<append>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
ui-sref="postcode.open()"
|
ng-click="$event.preventDefault(); postcode.open()"
|
||||||
icon="add_circle"
|
icon="add_circle"
|
||||||
vn-tooltip="New postcode">
|
vn-tooltip="New postcode">
|
||||||
</vn-icon-button>
|
</vn-icon-button>
|
||||||
|
|
|
@ -57,6 +57,13 @@ export default class AddressAutocomplete extends Component {
|
||||||
this.country = selection.countryFk;
|
this.country = selection.countryFk;
|
||||||
this.countryName = selection.countryName;
|
this.countryName = selection.countryName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async onResponse(response) {
|
||||||
|
await this.$.getLocations.refresh();
|
||||||
|
this.postCode = response.code;
|
||||||
|
// :TODO refesh displayed
|
||||||
|
this.$.location.refreshDisplayed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngModule.vnComponent('vnAddressAutocomplete', {
|
ngModule.vnComponent('vnAddressAutocomplete', {
|
||||||
|
|
Loading…
Reference in New Issue