Browse Source

refactor(gui): add missing prop in default value

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3370/head
Pranav C 2 years ago
parent
commit
c2b502f6d1
  1. 2
      packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue
  2. 2
      packages/nc-gui/components/tabs/Smartsheet.vue
  3. 3
      packages/nc-gui/composables/useViewFilters.ts

2
packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue

@ -86,6 +86,7 @@ const types = computed(() => {
watch( watch(
() => activeView.value?.id, () => activeView.value?.id,
(n, o) => { (n, o) => {
// if nested no need to reload since it will get reloaded from parent
if (!nested && n !== o && (hookId || !webHook)) loadFilters(hookId as string) if (!nested && n !== o && (hookId || !webHook)) loadFilters(hookId as string)
}, },
) )
@ -154,6 +155,7 @@ defineExpose({
<div class="col-span-5"> <div class="col-span-5">
<LazySmartsheetToolbarColumnFilter <LazySmartsheetToolbarColumnFilter
v-if="filter.id || filter.children" v-if="filter.id || filter.children"
:key="filter.id ?? i"
ref="localNestedFilters" ref="localNestedFilters"
v-model="filter.children" v-model="filter.children"
:parent-id="filter.id" :parent-id="filter.id"

2
packages/nc-gui/components/tabs/Smartsheet.vue

@ -38,7 +38,9 @@ const meta = computed<TableType | undefined>(() => activeTab.value && metas.valu
const { isGallery, isGrid, isForm, isKanban, isLocked } = useProvideSmartsheetStore(activeView, meta) const { isGallery, isGrid, isForm, isKanban, isLocked } = useProvideSmartsheetStore(activeView, meta)
const reloadEventHook = createEventHook<void | boolean>() const reloadEventHook = createEventHook<void | boolean>()
const reloadViewMetaEventHook = createEventHook<void | boolean>() const reloadViewMetaEventHook = createEventHook<void | boolean>()
const openNewRecordFormHook = createEventHook<void>() const openNewRecordFormHook = createEventHook<void>()
useProvideKanbanViewStore(meta, activeView) useProvideKanbanViewStore(meta, activeView)

3
packages/nc-gui/composables/useViewFilters.ts

@ -25,6 +25,7 @@ export function useViewFilters(
isNestedRoot?: boolean, isNestedRoot?: boolean,
) { ) {
let currentFilters = $ref(_currentFilters) let currentFilters = $ref(_currentFilters)
const reloadHook = inject(ReloadViewDataHookInj) const reloadHook = inject(ReloadViewDataHookInj)
const { nestedFilters } = useSmartsheetStoreOrThrow() const { nestedFilters } = useSmartsheetStoreOrThrow()
@ -41,7 +42,7 @@ export function useViewFilters(
const nestedMode = computed(() => isPublic.value || !isUIAllowed('filte rSync') || !isUIAllowed('filterChildrenRead')) const nestedMode = computed(() => isPublic.value || !isUIAllowed('filte rSync') || !isUIAllowed('filterChildrenRead'))
const tabMeta = inject(TabMetaInj, ref({ filterState: new Map() } as TabItem)) const tabMeta = inject(TabMetaInj, ref({ filterState: new Map(), sortsState: new Map() } as TabItem))
const filters = computed<Filter[]>({ const filters = computed<Filter[]>({
get: () => { get: () => {

Loading…
Cancel
Save