From cb1c5c6034e3c7560514f3e0c0d9ac719d96d8c4 Mon Sep 17 00:00:00 2001 From: Kiran Ashok Date: Tue, 30 Jul 2024 09:28:26 +0530 Subject: [PATCH] fix : Page change doesn't happen for table with CSA in viewer (#10457) --- frontend/src/_helpers/appUtils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/_helpers/appUtils.js b/frontend/src/_helpers/appUtils.js index 5a72b603ad..a111e434b0 100644 --- a/frontend/src/_helpers/appUtils.js +++ b/frontend/src/_helpers/appUtils.js @@ -69,7 +69,7 @@ export function setCurrentStateAsync(_ref, changes) { }); } -const debouncedChange = _.debounce(() => { +const debouncedChange = _.debounce((duplicateCurrentState) => { const newComponentsState = {}; for (const [key, value] of Object.entries(getCurrentState().components)) { if (duplicateCurrentState[key]) { @@ -177,7 +177,7 @@ export function onComponentOptionsChanged(component, options, id) { duplicateCurrentState = { ...components, [componentName]: componentData }; - debouncedChange(); + debouncedChange(duplicateCurrentState); } return Promise.resolve(); } @@ -246,7 +246,7 @@ export function onComponentOptionChanged(component, option_name, value, id) { } else { // Update the duplicate state if editor is not ready duplicateCurrentState = { ...components, [componentName]: componentData }; - debouncedChange(); + debouncedChange(duplicateCurrentState); } return Promise.resolve();