File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import { Handle } from '@xyflow/react' ;
1+ import { Handle , useNodeConnections } from '@xyflow/ react' ;
2+
33
44export default function IntegratorNode ( { data } ) {
5+ const connections = useNodeConnections ( {
6+ handleType : "target" ,
7+ } ) ;
8+
59 return (
610 < div
711 style = { {
@@ -17,7 +21,7 @@ export default function IntegratorNode({ data }) {
1721 >
1822 < div style = { { marginBottom : 4 } } > { data . label } </ div >
1923
20- < Handle type = "target" position = "left" style = { { background : '#555' } } />
24+ < Handle type = "target" position = "left" style = { { background : '#555' } } isConnectable = { connections . length < 1 } />
2125 < Handle type = "source" position = "right" style = { { background : '#555' } } />
2226 </ div >
2327 ) ;
You can’t perform that action at this time.
0 commit comments