feat: save the parameters of the generate operator to the form field … (#1390)

### What problem does this PR solve?
feat: save the parameters of the generate operator to the form field of
the node #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-07-05 15:52:24 +08:00
committed by GitHub
parent 472fcba7af
commit edc61e9b4c
10 changed files with 208 additions and 236 deletions

View File

@@ -189,7 +189,17 @@ const useGraphStore = create<RFState>()(
set({
nodes: get().nodes.map((node) => {
if (node.id === nodeId) {
node.data = { ...node.data, form: values };
// node.data = {
// ...node.data,
// form: { ...node.data.form, ...values },
// };
return {
...node,
data: {
...node.data,
form: { ...node.data.form, ...values },
},
} as any;
}
return node;