Eliav2 / react-xarrows

Draw arrows (or lines) between components in React!
https://codesandbox.io/embed/github/Eliav2/react-xarrows/tree/master/examples?fontsize=14&hidenavigation=1&theme=dark
MIT License
584 stars 75 forks source link

Crashes portal / popout #29

Closed larissa-n closed 3 years ago

larissa-n commented 4 years ago

Since portals are rendered outside of the dom, rendering a Xarrow element inside a portal will cause the application to crash.

https://codesandbox.io/s/popout-diagram-react-xarrows-7rzuj

Eliav2 commented 4 years ago

thank you for that demo. will be fixed in the future.

Eliav2 commented 4 years ago

Please see v1.5.0. Now app not crashes but arrows don't calculated because the elements not present in the dom. In next render of the parent the arrows will appear. Please try.

Eliav2 commented 3 years ago

@larissa-n hey, any response before closing this issue?

larissa-n commented 3 years ago
Screen Shot 2021-01-07 at 4 57 54 PM

Thank you, it's not crashing anymore! For some reason, the position of the arrow is off in my example. Any idea why that is?

Eliav2 commented 3 years ago

this is still an active bug ha? re-opening

Eliav2 commented 3 years ago

after closly checking this example i found out that the refs you passing to the arrow the wrong refs