diff --git a/packages/nc-gui-v2/composables/useSharedView.ts b/packages/nc-gui-v2/composables/useSharedView.ts index e033103bad..ce8faa3d5c 100644 --- a/packages/nc-gui-v2/composables/useSharedView.ts +++ b/packages/nc-gui-v2/composables/useSharedView.ts @@ -2,14 +2,17 @@ import type { ColumnType, ExportTypes, FilterType, PaginatedType, SortType, Tabl import { UITypes } from 'nocodb-sdk' import { useNuxtApp } from '#app' -const nestedFilters = ref<(FilterType & { status?: 'update' | 'delete' | 'create'; parentId?: string })[]>([]) -const paginationData = ref({ page: 1, pageSize: 25 }) -const sharedView = ref() -const sorts = ref([]) -const password = ref() -const allowCSVDownload = ref(false) - export function useSharedView() { + const nestedFilters = useState<(FilterType & { status?: 'update' | 'delete' | 'create'; parentId?: string })[]>( + 'nestedFilters', + () => [], + ) + const paginationData = useState('paginationData', () => ({ page: 1, pageSize: 25 })) + const sharedView = useState('sharedView') + const sorts = useState('sorts', () => []) + const password = useState('password') + const allowCSVDownload = useState('allowCSVDownload', () => false) + const meta = ref(sharedView.value?.model) const columns = ref(sharedView.value?.model?.columns) const formColumns = computed(