From 14a83d562d14f471e64efd1dbdc24cb52d05b359 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Wed, 24 Aug 2022 11:09:53 +0530 Subject: [PATCH] fix/Fixed form view column syncing issue --- packages/nc-gui-v2/components/smartsheet/Form.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui-v2/components/smartsheet/Form.vue b/packages/nc-gui-v2/components/smartsheet/Form.vue index 4b21f989c2..dac7ebb61b 100644 --- a/packages/nc-gui-v2/components/smartsheet/Form.vue +++ b/packages/nc-gui-v2/components/smartsheet/Form.vue @@ -48,11 +48,16 @@ const view = inject(ActiveViewInj) const { loadFormView, insertRow, formColumnData, formViewData, updateFormView } = useViewData(meta, view as any) -const { showAll, hideAll, saveOrUpdate } = useViewColumns(view, meta as any, async () => { +const reloadEventHook = createEventHook() +provide(ReloadViewDataHookInj, reloadEventHook) + +reloadEventHook.on(async () => { await loadFormView() setFormData() }) +const { showAll, hideAll, saveOrUpdate } = useViewColumns(view, meta as any, async () => reloadEventHook.trigger()) + const { syncLTARRefs } = useProvideSmartsheetRowStore( meta, ref({