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-id="getLocations"
|
||||
auto-load="true"
|
||||
url="Postcodes/location"
|
||||
data="$ctrl.locations"
|
||||
order="code">
|
||||
</vn-crud-model>
|
||||
{{$ctrl.postCode}}
|
||||
<vn-autocomplete
|
||||
vn-two
|
||||
vn-id="location"
|
||||
|
@ -12,17 +12,16 @@
|
|||
vn-name="location"
|
||||
ng-model="$ctrl.postCode"
|
||||
data="$ctrl.locations"
|
||||
selection="$ctrl.selection"
|
||||
show-field="name"
|
||||
value-field="id">
|
||||
<tpl-item class="address">
|
||||
<span>
|
||||
{{::name}}
|
||||
{{name}}
|
||||
</span>
|
||||
</tpl-item>
|
||||
<append>
|
||||
<vn-icon-button
|
||||
ui-sref="postcode.open()"
|
||||
ng-click="$event.preventDefault(); postcode.open()"
|
||||
icon="add_circle"
|
||||
vn-tooltip="New postcode">
|
||||
</vn-icon-button>
|
||||
|
|
|
@ -57,6 +57,13 @@ export default class AddressAutocomplete extends Component {
|
|||
this.country = selection.countryFk;
|
||||
this.countryName = selection.countryName;
|
||||
}
|
||||
|
||||
async onResponse(response) {
|
||||
await this.$.getLocations.refresh();
|
||||
this.postCode = response.code;
|
||||
// :TODO refesh displayed
|
||||
this.$.location.refreshDisplayed();
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnAddressAutocomplete', {
|
||||
|
|
Loading…
Reference in New Issue