hotFix(smartTable): refresh button await query #1043
|
@ -40,7 +40,8 @@
|
||||||
</vn-button>
|
</vn-button>
|
||||||
</div>
|
</div>
|
||||||
<vn-button icon="refresh"
|
<vn-button icon="refresh"
|
||||||
ng-click="$ctrl.model.refresh()"
|
ng-click="$ctrl.refresh()"
|
||||||
|
disabled="$ctrl.isRefreshing"
|
||||||
vn-tooltip="Refresh">
|
vn-tooltip="Refresh">
|
||||||
</vn-button>
|
</vn-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -511,6 +511,12 @@ export default class SmartTable extends Component {
|
||||||
return this.model.save()
|
return this.model.save()
|
||||||
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
|
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refresh() {
|
||||||
|
this.isRefreshing = true;
|
||||||
|
this.model.refresh()
|
||||||
|
.then(() => this.isRefreshing = false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SmartTable.$inject = ['$element', '$scope', '$transclude'];
|
SmartTable.$inject = ['$element', '$scope', '$transclude'];
|
||||||
|
|
Loading…
Reference in New Issue