diff --git a/packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue b/packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue index 816ae9c15a..09231feb10 100644 --- a/packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue +++ b/packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue @@ -15,8 +15,8 @@ const { parentId, autoSave = true, hookId = null, - modelValue: Filter[] -} = defineProps<{ nested?: boolean; parentId?: string; autoSave: boolean; hookId?: string }>() + modelValue, +} = defineProps<{ nested?: boolean; parentId?: string; autoSave: boolean; hookId?: string; modelValue?: Filter[] }>() const emit = defineEmits(['update:filtersLength']) diff --git a/packages/nc-gui-v2/composables/useViewData.ts b/packages/nc-gui-v2/composables/useViewData.ts index 16a769269f..8c37a085bf 100644 --- a/packages/nc-gui-v2/composables/useViewData.ts +++ b/packages/nc-gui-v2/composables/useViewData.ts @@ -107,7 +107,7 @@ export function useViewData( if ((!project?.value?.id || !meta?.value?.id || !viewMeta?.value?.id) && !isPublic.value) return const response = !isPublic.value - ? await $api.dbViewRow.list('noco', project.value.id, meta.value.id, viewMeta.value.id, { + ? await $api.dbViewRow.list('noco', project.value.id!, meta.value.id!, viewMeta!.value.id, { ...params, where: where?.value, }) diff --git a/packages/nc-gui-v2/composables/useViewFilters.ts b/packages/nc-gui-v2/composables/useViewFilters.ts index a5b7e2e199..4d1372a460 100644 --- a/packages/nc-gui-v2/composables/useViewFilters.ts +++ b/packages/nc-gui-v2/composables/useViewFilters.ts @@ -86,7 +86,7 @@ export function useViewFilters( } } } - } + reloadData?.() } diff --git a/packages/nc-gui-v2/composables/useViewSorts.ts b/packages/nc-gui-v2/composables/useViewSorts.ts index 3926eb467c..b6a3fa6bc0 100644 --- a/packages/nc-gui-v2/composables/useViewSorts.ts +++ b/packages/nc-gui-v2/composables/useViewSorts.ts @@ -68,17 +68,12 @@ export function useViewSorts( const deleteSort = async (sort: SortType, i: number) => { // TOOD: // if (!this.shared && sort.id && this._isUIAllowed('sortSync')) { - if (isPublic.value) { - sorts.value.splice(i, 1) - sorts.value = [...sorts.value] - return - } - if (isUIAllowed('sortSync') && sort.id) { + if (isUIAllowed('sortSync') && sort.id && !isPublic.value) { await $api.dbTableSort.delete(sort.id) - } else { - sorts.value.splice(i, 1) } + sorts.value.splice(i, 1) + sorts.value = [...sorts.value] } return { sorts, loadSorts, addSort, deleteSort, saveOrUpdate } }