diff --git a/packages/nc-gui/composables/useViewFilters.ts b/packages/nc-gui/composables/useViewFilters.ts index 7349996e5a..8369d35141 100644 --- a/packages/nc-gui/composables/useViewFilters.ts +++ b/packages/nc-gui/composables/useViewFilters.ts @@ -22,9 +22,10 @@ export function useViewFilters( parentId?: string, autoApply?: ComputedRef, reloadData?: () => void, - currentFilters?: Filter[], + _currentFilters?: Filter[], isNestedRoot?: boolean, ) { + let currentFilters = $ref(_currentFilters) const reloadHook = inject(ReloadViewDataHookInj) const { nestedFilters } = useSmartsheetStoreOrThrow() @@ -44,7 +45,9 @@ export function useViewFilters( const tabMeta = inject(TabMetaInj, ref({ filterState: new Map() } as TabItem)) const filters = computed({ - get: () => (nestedMode.value ? currentFilters! : _filters.value), + get: () => { + return nestedMode.value ? currentFilters! : _filters.value + }, set: (value: Filter[]) => { if (nestedMode.value) { currentFilters = value diff --git a/packages/nc-gui/composables/useViewSorts.ts b/packages/nc-gui/composables/useViewSorts.ts index a128f0f82c..f86eaf84c1 100644 --- a/packages/nc-gui/composables/useViewSorts.ts +++ b/packages/nc-gui/composables/useViewSorts.ts @@ -13,6 +13,7 @@ import { useSmartsheetStoreOrThrow, useUIPermission, } from '#imports' +import { TabItem } from '~/lib' export function useViewSorts(view: Ref, reloadData?: () => void) { const { sharedView } = useSharedView()