fix(smartTable): refresh button await query
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-09-07 10:30:50 +02:00
parent ee23e26104
commit bbc5790945
2 changed files with 15 additions and 8 deletions

View File

@ -40,7 +40,8 @@
</vn-button>
</div>
<vn-button icon="refresh"
ng-click="$ctrl.model.refresh()"
ng-click="$ctrl.refresh()"
disabled="$ctrl.isRefreshing"
vn-tooltip="Refresh">
</vn-button>
</div>

View File

@ -511,6 +511,12 @@ export default class SmartTable extends Component {
return this.model.save()
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
}
refresh() {
this.isRefreshing = true;
this.model.refresh()
.then(() => this.isRefreshing = false);
}
}
SmartTable.$inject = ['$element', '$scope', '$transclude'];