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

If id is removed from dom or not available Xarrow must give error #135

Open vikasacharya16 opened 2 years ago

vikasacharya16 commented 2 years ago
<YourComponent id={'comp1'}/>
<YourComponent id={'comp2'}/>
<Xarrow start={'comp1'} end={'comp2'}/>

if comp2 is remove from dom Then I was getting like below. Instead Xarrow show give an error or something to handle this situation. Also When i put comp2 back Xarrow is not rerendering. Kindly fix the issue

chrome-capture

gbarkhatov commented 1 year ago

Did you solve the issue @vikasacharya16 ?

viktormarinho commented 1 year ago

Any updates on this @vikasacharya16 ?

vikasacharya16 commented 10 months ago

@gbarkhatov @viktormarinho No, I didn't solved. if the dom element start or end is removed then relation should vanish. if its changed it should rerender. give me some hints on how to achieve this.

MagnusPladsen commented 5 months ago

I have same issue here.

If the target is removed from the DOM the arrow bugs out.

Since the arrows is a generated svg there is no possible way to remove it in the code. (as i know of)

image