File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed
Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 88 useReactFlow ,
99 Panel ,
1010} from "reactflow" ;
11- import JsonVisNode from "./Custom Nodes/jsonVisNode" ;
11+ import JsonVisNode from "./Custom- Nodes/jsonVisNode" ;
1212
1313// we define the nodeTypes outside of the component to prevent re-renderings
1414// you could also use useMemo inside the component
Original file line number Diff line number Diff line change @@ -4,20 +4,11 @@ import {Handle} from 'reactflow';
44
55// eslint-disable-next-line react/prop-types
66function JsonVisNode ( { data, targetPosition, sourcePosition} ) {
7-
8- // console.log
9- // console.log(data.label);
107 let str ;
11- if ( typeof data . label === 'object' ) {
12- str = Object . entries ( data . label ) ;
13- } else {
8+ if ( typeof data . label !== 'object' ) {
9+
1410 str = data . label ;
1511 }
16-
17- // console.log(str);
18-
19- // const strArr = (typeof data.label === 'object' ) ? data.label?.split(',')
20- // console.log(strArr)
2112 return (
2213 < >
2314 < Handle type = "target" position = { targetPosition } > </ Handle >
You can’t perform that action at this time.
0 commit comments