fix : Page change doesn't happen for table with CSA in viewer (#10457)

This commit is contained in:
Kiran Ashok 2024-07-30 09:28:26 +05:30 committed by GitHub
parent f014a52d99
commit cb1c5c6034
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();