How to expand all nodes by default in treeview in react?
Can anyone give example how to achieve this?
2 Answers, 1 is accepted
0
Filip
Telerik team
answered on 03 Feb 2023, 10:07 AM
Hi,
While the TreeView does not provide a built-in feature for expanding and collapsing all its items at once, the component supports such an implementation.
More information and an example can be found here:
The main idea is to set the expanded field of each TreeView node to true. To enable the collapse-all mode for its items, set the expanded field of each TreeView node to a falsy value.
Regards,
Filip
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.