From bbc5790945bce971f39a0e8e48f34b971865f3f4 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 7 Sep 2022 10:30:50 +0200 Subject: [PATCH] fix(smartTable): refresh button await query --- front/core/components/smart-table/index.html | 17 +++++++++-------- front/core/components/smart-table/index.js | 6 ++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/front/core/components/smart-table/index.html b/front/core/components/smart-table/index.html index a3295c47e..f26a6b4a2 100644 --- a/front/core/components/smart-table/index.html +++ b/front/core/components/smart-table/index.html @@ -10,9 +10,9 @@
-
- {{model.data.length}} - results +
+ {{model.data.length}} + results
@@ -64,7 +65,7 @@
Shown columns
-
@@ -101,4 +102,4 @@ - \ No newline at end of file + diff --git a/front/core/components/smart-table/index.js b/front/core/components/smart-table/index.js index 401541c2c..9e6e7009c 100644 --- a/front/core/components/smart-table/index.js +++ b/front/core/components/smart-table/index.js @@ -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'];