bumbeishvili / org-chart

Highly customizable org chart. Integrations available for Angular, React, Vue
https://stackblitz.com/edit/web-platform-o5t1ha
MIT License
928 stars 330 forks source link

Whenever I try to change the parentId of a node, the parent node automatically expands, can this be prevented? #432

Closed seanpmaxwell closed 2 months ago

seanpmaxwell commented 2 months ago

I have my own custom code for updating the parent of a data item in the array. After I update the parentId of the data item and call: chart.data(data).render(); the parent node automatically expands. I've tried all kinds of hacky things to prevent this but to no avail. This does not happen when I add a new node. Only when I change the parentId of an existing node.

bumbeishvili commented 2 months ago

@seanpmaxwell can you provide a sample stackblitz link with with that reproduced?

seanpmaxwell commented 2 months ago

Thanks for the quick response, I couldn't reproduce on stackblitz. When I was fetching the data item through the allNodes from the chart I had the issue. When I updated the data array directly the problem went away. Weird.