Lazy loading Kendo TreeList

1 Answer 158 Views
TreeList
Vitalii
Top achievements
Rank 1
Vitalii asked on 27 Mar 2023, 07:09 AM
Hello everyone, does component TreeList from Kendo for React has Lazy loading?

Example from where I get: https://demos.telerik.com/aspnet-mvc/treeview/remote-data-binding

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 28 Mar 2023, 07:41 PM

Hi, Vitalii,

We have a logged enhancement in our repo for introducing a loadingField prop that will add a loading icon instead of the expand icon when necessary:

https://github.com/telerik/kendo-react/issues/737

Here is also an example that showcases how this can be achieved:

https://stackblitz.com/edit/react-xchvii-cp4xmc?file=app/main.jsx

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/.

Jacky
Top achievements
Rank 1
commented on 13 Jul 2023, 08:37 PM

Hi Filip,

 

In your example, your nodes already have children in the file.  How can you trick the TreeList to display an expand icon if the node doesn't have children nodes yet?  The children nodes will be loaded on demand when the expand icon is pressed.  Is there a way to tell the Treelist that this node has children vs is a leaf node?

 

Thanks,

Jacky

Filip
Telerik team
commented on 17 Jul 2023, 03:38 PM

Hi, Jacky,

A possible way to trick the TreeList to display the expand icon without any children would be to set the subItemsField to an empty object, the following demo can be used as a reference:

https://stackblitz.com/edit/react-1i1zu6-s8txsb?file=app%2Fmain.jsx

As for telling the TreeList that a certain node has children or it is a leaf node is not supported.

Regards,
Filip

Tags
TreeList
Asked by
Vitalii
Top achievements
Rank 1
Answers by
Filip
Telerik team
Share this question
or