Feat: Use one-way data flow to synchronize the form data to the canvas #3221 (#7977)

### What problem does this PR solve?

Feat: Use one-way data flow to synchronize the form data to the canvas
#3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-30 16:02:27 +08:00
committed by GitHub
parent bd4678bca6
commit 9f38b22a3f
16 changed files with 460 additions and 90 deletions

View File

@ -23,17 +23,13 @@ export function useHandleFreedomChange() {
updateNodeForm(node?.id, nextValues);
}
console.info('xx:', node);
for (const key in values) {
if (Object.prototype.hasOwnProperty.call(values, key)) {
const element = values[key];
// form.reset({ ...currentValues, ...values });
// for (const key in values) {
// if (Object.prototype.hasOwnProperty.call(values, key)) {
// const element = values[key];
// form.setValue(key, element);
// }
// }
form.setValue(key, element);
}
}
},
[form, node, updateNodeForm],
);