Get Nodes on parent

Hi Team,

can you help me with problem. I'm adding node programmatically with:

tree.addNodes(nodesArray, parentId)

but would like to empty node list on parent, before I add new nodes. Is that possible? In documentation did not found method getNodes(parentId), or setNodes(parentId) which would solve this small issue.

Can you please point me in the right direction?

BR

Vedran


2 Replies 1 reply marked as answer

VH Vedran Hudec December 6, 2022 04:09 PM UTC

Hi,


if someone is loading data without their dataManager (e.g. directly through axios or vuex). The solution is to create flat Tree data with all the nodes, and before call to addNodes method to check that parent node, does not have children defined.


BR


Marked as answer

SS Shereen Shajahan Syncfusion Team December 9, 2022 06:49 AM UTC

Hi Vedran,

We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help.

Regards

Shereen


Loader.
Up arrow icon