@@ -128,7 +143,7 @@ watch(
false)
const isLocked = inject(IsLockedInj)
// todo: emit from child
const filtersLength = ref(0)
+// todo: sync with store
+const autosave = ref(true)
+
+const filterComp = ref()
// todo: implement
-const applyChanges = () => {}
+const applyChanges = async () => {
+ await filterComp?.value?.applyChanges()
+}
@@ -28,7 +35,27 @@ const applyChanges = () => {}
-
+
diff --git a/packages/nc-gui-v2/composables/useViewFilters.ts b/packages/nc-gui-v2/composables/useViewFilters.ts
index f2942fc3db..365f970eb4 100644
--- a/packages/nc-gui-v2/composables/useViewFilters.ts
+++ b/packages/nc-gui-v2/composables/useViewFilters.ts
@@ -1,10 +1,11 @@
import type { FilterType, GalleryType, GridType, KanbanType } from 'nocodb-sdk'
-import type { Ref } from 'vue'
+import type { ComputedRef, Ref } from 'vue'
import { useNuxtApp } from '#imports'
export function useViewFilters(
view: Ref<(GridType | KanbanType | GalleryType) & { id?: string }> | undefined,
parentId?: string,
+ autoApply?: ComputedRef