Browse Source

fix(gui-v2): force-reload related table meta on LTAR column creation

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3057/head
Pranav C 2 years ago
parent
commit
ca99585bf8
  1. 6
      packages/nc-gui-v2/composables/useColumnCreateStore.ts

6
packages/nc-gui-v2/composables/useColumnCreateStore.ts

@ -196,9 +196,11 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
} }
await $api.dbTableColumn.create(meta.value.id as string, formState.value) await $api.dbTableColumn.create(meta.value.id as string, formState.value)
if (formState.value.uidt === UITypes.LinkToAnotherRecord) { /** if LTAR column then force reload related table meta */
await getMeta(formState.value.childId, true) if (formState.value.uidt === UITypes.LinkToAnotherRecord && meta.value.id !== formState.value.childId) {
getMeta(formState.value.childId, true)
} }
toast.success('Column created') toast.success('Column created')
} }
onSuccess() onSuccess()

Loading…
Cancel
Save