From d55800a77193f3f394e51f449216c396182b87b6 Mon Sep 17 00:00:00 2001 From: Dahyun Yu Date: Fri, 20 Dec 2024 13:56:50 +0900 Subject: [PATCH] fix: fix apply button (#5276) Signed-off-by: yuda --- .../modules/widgets/_components/WidgetFormOverlayStep2.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/common/modules/widgets/_components/WidgetFormOverlayStep2.vue b/apps/web/src/common/modules/widgets/_components/WidgetFormOverlayStep2.vue index 0f0010d14c..2a30ceb1fa 100644 --- a/apps/web/src/common/modules/widgets/_components/WidgetFormOverlayStep2.vue +++ b/apps/web/src/common/modules/widgets/_components/WidgetFormOverlayStep2.vue @@ -62,7 +62,7 @@ const state = reactive({ fieldManager = new WidgetFieldValueManager( getWidgetConfig(widgetGenerateState.selectedWidgetName), widgetGenerateGetters.selectedDataTable, - widgetGenerateState.widget?.options || {}, + cloneDeep(widgetGenerateState.widget?.options) || {}, ); } return fieldManager; @@ -88,7 +88,7 @@ const state = reactive({ return WIDGET_WIDTH_RANGE_LIST[state.widgetSize]?.[0] || 0; }), isWidgetFieldChanged: computed(() => { - const _isOptionsChanged = !isEqual(state.fieldManager.data, widgetGenerateState.widget?.options); + const _isOptionsChanged = !isEqual(cloneDeep(state.fieldManager.data), widgetGenerateState.widget?.options); const _isTypeChanged = widgetGenerateState.selectedWidgetName !== widgetGenerateState.widget?.widget_type; emit('watch-options-changed', _isOptionsChanged || _isTypeChanged); return _isOptionsChanged || _isTypeChanged; @@ -124,7 +124,7 @@ const updateWidget = async () => { state: 'ACTIVE', }); if (widget) { - state.fieldManager.updateOriginData(widget.options); + state.fieldManager.updateOriginData(cloneDeep(widget.options)); } if (_isCreating) { await dashboardStore.addWidgetToDashboard(dashboardDetailState.dashboardId || '', widgetGenerateState.widgetId);