Merge pull request 'hotFix(smartTable): refresh button await query' (#1043) from hotFix_smartTable_awaitRefresh into master
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #1043
This commit is contained in:
commit
313ce773ae
|
@ -10,9 +10,9 @@
|
|||
<div ng-transclude="actions"></div>
|
||||
</div>
|
||||
<div class="actions-right">
|
||||
<div class="totalRows" ng-if="$ctrl.model.data">
|
||||
{{model.data.length}}
|
||||
<span translate>results</span>
|
||||
<div class="totalRows" ng-if="$ctrl.model.data">
|
||||
{{model.data.length}}
|
||||
<span translate>results</span>
|
||||
</div>
|
||||
<vn-button icon="search"
|
||||
ng-if="$ctrl.options.activeButtons.search"
|
||||
|
@ -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>
|
||||
|
@ -64,7 +65,7 @@
|
|||
|
||||
<vn-crud-model
|
||||
ng-if="$ctrl.viewConfigId"
|
||||
vn-id="userViewModel"
|
||||
vn-id="userViewModel"
|
||||
url="UserConfigViews"
|
||||
link="{tableCode: $ctrl.viewConfigId, userFk: $ctrl.currentUserId}"
|
||||
data="$ctrl.viewConfig"
|
||||
|
@ -75,9 +76,9 @@
|
|||
<div class="smart-table-columns vn-pa-md vn-w-sm">
|
||||
<vn-horizontal>
|
||||
<h6 translate style="margin:0">Shown columns</h6>
|
||||
<vn-icon
|
||||
<vn-icon
|
||||
vn-none
|
||||
icon="info"
|
||||
icon="info"
|
||||
color-marginal
|
||||
vn-tooltip="Check the columns you want to see"/>
|
||||
</vn-horizontal>
|
||||
|
@ -101,4 +102,4 @@
|
|||
</vn-horizontal>
|
||||
</div>
|
||||
</tpl-body>
|
||||
</vn-popover>
|
||||
</vn-popover>
|
||||
|
|
|
@ -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'];
|
||||
|
|
Loading…
Reference in New Issue