Adding nodes programmatically (typescript)

Hello

I have a problem adding new nodes on the fly, the signature of addNodes makes no sense...
What is: undefined[]

Taken from the example:
var item = { id: nodeId, name: "New Folder" };
tree.addNodes([item])

Type '{ id: any; name: string; }' is not assignable to type 'undefined'.Vetur(2322)

1 Reply

SP Sowmiya Padmanaban Syncfusion Team February 26, 2020 12:19 PM UTC

Hi Nicolas,  
 
Greetings from Syncfusion support. 
 
We have checked your reported problem and unable to reproduce it. To achieve your requirement, we have prepared a sample using addNodes() method in TreeView component. 
 
Refer the sample link : 
 
To more about the addNodes() method and TreeView component. Refer the below links. 
 
 
 
 
If we misunderstand your requirement. Can you please share the additional details regarding your requirement. It will helpful for us to resolve your issue at earliest. 
 
Please let us know, if you need any further assistance. 
 
 
Regards,  
Sowmiya.P 



Loader.
Up arrow icon