Skip to content

Commit e8fa864

Browse files
committed
chore: 节点自动连线
1 parent 8fe3444 commit e8fa864

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/x-flow/src/XFlow.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ const XFlow: FC<FlowProps> = memo(() => {
190190
return (
191191
<CustomNode
192192
{...rest}
193+
id={id}
193194
data={{ ...restData }}
194195
type={_nodeType}
195196
layout={layout}

packages/x-flow/src/components/CustomNode/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default memo((props: any) => {
1515
widgets[`${capitalize(type)}Node`] || widgets['CommonNode'];
1616
const [isHovered, setIsHovered] = useState(false);
1717
const reactflow = useReactFlow();
18-
const { addNodes, addEdges, mousePosition,nodes,edges } = useStore(
18+
const { addNodes, addEdges, mousePosition } = useStore(
1919
(state: any) => ({
2020
nodes: state.nodes,
2121
edges: state.edges,

0 commit comments

Comments
 (0)