- fixed blue cell color after removing dynamic tag;

This commit is contained in:
Vitalii Kiiko
2026-04-07 10:50:52 +02:00
parent 2804dd897a
commit 4cbd28d58d
2 changed files with 78 additions and 4 deletions

View File

@@ -73,7 +73,11 @@ const BuilderElementSettings = ({ closeSettingsFn, callStatus, context }) => {
const saveSettings = () => {
let newActiveElementData = klona(activeElementData);
newActiveElementData = wrap(newActiveElementData).set(['settings'], settings).value();
// Prefer the store value over React state: child components (e.g. ElementSettingSpreadsheet)
// write to the store synchronously, but React state updates are batched and may lag behind
// when saveSettings is called in the same event as the last setDataFn call.
const latestSettings = storeGet('chosenFieldSettings') || settings;
newActiveElementData = wrap(newActiveElementData).set(['settings'], latestSettings).value();
newActiveElementData = wrap(newActiveElementData).set(['validators'], validators).value();
newActiveElementData = wrap(newActiveElementData).set(['dynamicData'], dynamicData).value();
newActiveElementData = wrap(newActiveElementData).set(['criteria'], criteria).value();