I am editing a TreeNodes data via a popup modal - and whenever the Modal pop up the Treeview ,minimizes all of its nodes

I have 2 types of treeview nodes - and the bottom level nodes are edited using a <Modal> from reactstrap. 

When the modal shows with the relevant Node data for editing, the Treeview (shown behind the popup), minimizes (closes) all of its nodes. It appears as if the treeview is doing a refresh for some reason

I have tried using the expanded property in the datasource and this auto opens the respective nodes as expected, but then when a node is clicked closed, the expanded property is still set to true, even thought the node is now closed. Does the treeview NOT maintain the expanded flag in the datasource structure as the nodes are expanded or collapsed? Or is there some other proiperty i need to set to ensure the expanded flag is maintained? 

And also why would the treeview be doing a refresh? as the datasource his not changing  


1 Reply

SS Sivakumar ShunmugaSundaram Syncfusion Team May 5, 2022 04:57 PM UTC

Hi Grant,


We have validated your reported issue in the React TreeView component. We understand that you are facing an expand/collapse issue while opening the dialog window for editing the TreeView node. We have prepared a simple sample of TreeView to open a dialog window while editing the TreeView node. But we were quite unclear about the exact code handled at your end on node edit which might cause this issue. Please confirm whether the editing parent node is collapsed or entire TreeView nodes are collapsed on dialog opening.


Check the attached sample for your reference.


Sample: https://stackblitz.com/edit/react-nnwbe5?file=index.js


If we misunderstand your requirement, share your complete code blocks else replicate the issue in the shared sample. It will help us to provide a prompt solution.


Please let us know if you need any further assistance.


Regards,

Sivakumar S


Loader.
Up arrow icon