mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
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:
@ -476,14 +476,13 @@ const useGraphStore = create<RFState>()(
|
|||||||
},
|
},
|
||||||
updateNodeName: (id, name) => {
|
updateNodeName: (id, name) => {
|
||||||
if (id) {
|
if (id) {
|
||||||
set({
|
set((state) => {
|
||||||
nodes: get().nodes.map((node) => {
|
for (const node of state.nodes) {
|
||||||
if (node.id === id) {
|
if (node.id === id) {
|
||||||
node.data.name = name;
|
node.data.name = name;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return node;
|
|
||||||
}),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user