Browse Source

fix : fixed column syncing in useViewColumnsOrThrow hook

pull/7168/head
musharaf-nocodb 10 months ago
parent
commit
b151d5ea4b
  1. 4
      packages/nc-gui/composables/useViewColumns.ts

4
packages/nc-gui/composables/useViewColumns.ts

@ -275,9 +275,9 @@ const [useProvideViewColumns, useViewColumns] = useInjectionState(
} }
// reload view columns when active view changes // reload view columns when active view changes
// or when columns count changes(delete/add) // or when columns changes(delete/add)
watch( watch(
[() => view?.value?.id, () => meta.value?.columns?.length], [() => view?.value?.id, () => meta.value?.columns],
async ([newViewId]) => { async ([newViewId]) => {
// reload only if view belongs to current table // reload only if view belongs to current table
if (newViewId && view.value?.fk_model_id === meta.value?.id) { if (newViewId && view.value?.fk_model_id === meta.value?.id) {

Loading…
Cancel
Save