From ab8f15c2025a9b782ae2dba3b185b8c84c4f9b4e Mon Sep 17 00:00:00 2001 From: amandesai01 Date: Wed, 4 Dec 2024 06:46:02 +0000 Subject: [PATCH] chore: don't save on base change --- packages/nc-gui/composables/useExtensions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/composables/useExtensions.ts b/packages/nc-gui/composables/useExtensions.ts index 626a30c95e..5bff28067e 100644 --- a/packages/nc-gui/composables/useExtensions.ts +++ b/packages/nc-gui/composables/useExtensions.ts @@ -108,15 +108,15 @@ export const useExtensions = createSharedComposable(() => { } watch( - [base, activeBaseExtensions], + base, () => { extensionPanelSize.value = +panelState.value[base.value.id!]?.width || 40 isPanelExpanded.value = panelState.value[base.value.id!]?.isOpen || false - savePanelState() }, { immediate: true }, ) + // Debounce since width is updated continuously when user drags. watchDebounced([extensionPanelSize, isPanelExpanded], savePanelState, { debounce: 500, maxWait: 1000 }) const toggleExtensionPanel = () => {