MrBlenny / react-flow-chart

🌊 A flexible, stateless, declarative flow chart library for react.
https://mrblenny.github.io/react-flow-chart/index.html
MIT License
1.46k stars 307 forks source link

Why does the external state chart not load properly with basic configs? #65

Closed sujitykulkarni closed 4 years ago

sujitykulkarni commented 4 years ago

I am trying to load chart with external state, but the way it renders looks odd, and the basic features are not working? Can someone please help?

image

Code: https://codesandbox.io/s/react-flow-chart-poc-miiho

krashdifferent commented 4 years ago

Port positional callbacks are used to update where the links will connect. If you use external state you either need to handle all of the callbacks that will update positions and node sizes on first render or supply port positions manually in the state object.