From dc338572dd0a9aa76a568a844bce65fe6c8ce569 Mon Sep 17 00:00:00 2001 From: Cleopatra Enjeck M Date: Mon, 19 Feb 2024 13:18:56 +0100 Subject: [PATCH] enh: clean up Signed-off-by: Cleopatra Enjeck M --- src/modules/main/sections/MainWrapper.vue | 4 ++++ src/shared/components/ncTable/NcTable.vue | 16 ++++++++-------- .../components/ncTable/sections/CustomTable.vue | 3 --- src/store/data.js | 6 ------ 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/modules/main/sections/MainWrapper.vue b/src/modules/main/sections/MainWrapper.vue index a6216c139..684a204dc 100644 --- a/src/modules/main/sections/MainWrapper.vue +++ b/src/modules/main/sections/MainWrapper.vue @@ -109,9 +109,13 @@ export default { // Used to reload View from backend, in case there are Filter updates const isLastElementSameAndView = this.element.id === this.lastActiveElement?.id && this.isView === this.lastActiveElement?.isView + if (!this.lastActiveElement || this.element.id !== this.lastActiveElement.id || isLastElementSameAndView || this.isView !== this.lastActiveElement.isView || force) { this.localLoading = true + // Since we show one page at a time, no need keep other tables in the store + await this.$store.dispatch('clearState') + this.viewSetting = {} await this.$store.dispatch('loadColumnsFromBE', { diff --git a/src/shared/components/ncTable/NcTable.vue b/src/shared/components/ncTable/NcTable.vue index b3e557d0a..0d371c1ea 100644 --- a/src/shared/components/ncTable/NcTable.vue +++ b/src/shared/components/ncTable/NcTable.vue @@ -41,19 +41,19 @@ deselect-all-rows -> unselect all rows, e.g. after deleting selected rows
+ @delete-selected-rows="rowIds => $emit('delete-selected-rows', rowIds)" />