From bee72fc5bea1baae9c89e34d8562aa706ed54607 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 8 Oct 2022 11:09:49 +0530 Subject: [PATCH] fix(gui): reload column width data when column create/delete or when view changes Signed-off-by: Pranav C --- packages/nc-gui/composables/useGridViewColumnWidth.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/composables/useGridViewColumnWidth.ts b/packages/nc-gui/composables/useGridViewColumnWidth.ts index b73f58bf12..adca292855 100644 --- a/packages/nc-gui/composables/useGridViewColumnWidth.ts +++ b/packages/nc-gui/composables/useGridViewColumnWidth.ts @@ -50,8 +50,9 @@ export function useGridViewColumnWidth(view: Ref) { loadCss() } - /** when columns changes(create/delete) reload grid columns */ - watch(columns, loadGridViewColumns) + /** when columns changes(create/delete) reload grid columns + * or when view changes reload columns width */ + watch([() => columns.value?.length, () => view?.value?.id ], loadGridViewColumns) const updateWidth = async (id: string, width: string) => { if (gridViewCols?.value?.[id]) {