mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: Update Switch form data #1739 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -30,6 +30,7 @@ import {
|
||||
NodeMap,
|
||||
Operator,
|
||||
RestrictedUpstreamMap,
|
||||
SwitchElseTo,
|
||||
initialArXivValues,
|
||||
initialBaiduFanyiValues,
|
||||
initialBaiduValues,
|
||||
@ -519,6 +520,17 @@ export const useWatchNodeFormDataChange = () => {
|
||||
return pre;
|
||||
}, []);
|
||||
|
||||
// Splice the else condition of the conditional judgment to the edge list
|
||||
const elseTo = form[SwitchElseTo];
|
||||
if (elseTo) {
|
||||
downstreamEdges.push({
|
||||
id: uuid(),
|
||||
source: nodeId,
|
||||
target: elseTo,
|
||||
sourceHandle: SwitchElseTo,
|
||||
});
|
||||
}
|
||||
|
||||
setEdgesByNodeId(nodeId, downstreamEdges);
|
||||
},
|
||||
[setEdgesByNodeId],
|
||||
|
||||
Reference in New Issue
Block a user