Fix: The nodes on the canvas were not updated in time after the operator name was modified. #10866 (#10911)
### What problem does this PR solve? Fix: The nodes on the canvas were not updated in time after the operator name was modified. #10866 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
d8a7fb6f2b
commit
e9debfd74d
1 changed files with 4 additions and 5 deletions
|
|
@ -476,14 +476,13 @@ const useGraphStore = create<RFState>()(
|
|||
},
|
||||
updateNodeName: (id, name) => {
|
||||
if (id) {
|
||||
set({
|
||||
nodes: get().nodes.map((node) => {
|
||||
set((state) => {
|
||||
for (const node of state.nodes) {
|
||||
if (node.id === id) {
|
||||
node.data.name = name;
|
||||
break;
|
||||
}
|
||||
|
||||
return node;
|
||||
}),
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue