From be70b540a5a676d17911cfc9bd9168269cc9d2cd Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 30 Aug 2022 14:36:17 +0530 Subject: [PATCH] refactor(gui-v2): tab level sort state Signed-off-by: Pranav C --- .../smartsheet/toolbar/ColumnFilterMenu.vue | 4 +- .../nc-gui/components/tabs/Smartsheet.vue | 45 +++---------------- packages/nc-gui/composables/useTabs.ts | 5 ++- packages/nc-gui/composables/useViewFilters.ts | 14 +++++- packages/nc-gui/composables/useViewSorts.ts | 17 ++++++- 5 files changed, 40 insertions(+), 45 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue index df14f1e643..178c242243 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue @@ -29,8 +29,8 @@ const { $e } = useNuxtApp() const { nestedFilters } = useSmartsheetStoreOrThrow() // todo: avoid duplicate api call by keeping a filter store -const { nonDeletedFilters, loadFilters } = useViewFilters( - activeView, +const { activeView, nonDeletedFilters, loadFilters } = useViewFilters( + activeView!, undefined, computed(() => true), () => false, diff --git a/packages/nc-gui/components/tabs/Smartsheet.vue b/packages/nc-gui/components/tabs/Smartsheet.vue index a259d7c966..dbe73e4af6 100644 --- a/packages/nc-gui/components/tabs/Smartsheet.vue +++ b/packages/nc-gui/components/tabs/Smartsheet.vue @@ -1,7 +1,5 @@