bug fixed in address edit with watcher

This commit is contained in:
Dani Herrero 2017-09-21 12:24:14 +02:00
parent ec4adc7552
commit 490ff51fa6
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,6 @@
data="$ctrl.address"
form="form">
</vn-watcher>
<mg-ajax path="/client/api/Addresses/{{edit.params.addressId}}" actions="$ctrl.address=edit.model" options="mgEdit"></mg-ajax>
<form name="form" ng-submit="watcher.submitBack()" pad-medium>
<vn-card>
<vn-vertical pad-large>

View File

@ -153,7 +153,8 @@ export default class Watcher extends Component {
return copy;
}
callback(transition) {
if (!this.state && this.dataChanged()) {
let dataChanged = this.dataChanged();
if (!this.state && dataChanged) {
this.state = transition.to().name;
this.$scope.confirm.show();
return false;