New to KendoReactStart a free 30-day trial

Lazy load the items of the KendoReact MultiSelectTree component.

Environment

Product Version6.0.3
ProductProgress® KendoReact MultiSelectTree

Description

How can I lazy load the items of the KendoReact MultiSelect component?

Solution

The below example simulates an API call for the MultiSelectTree component by loading a loadingPanel component to the MultiSelectTree element when an item is expanded. In addition, the loadingPanel is added to the MultiSelectTree element using ReactDOM.createPortal in the LoadingPanel component. Also, the loading state variable is set to true in the onExpandChange event handler and in that case the panel will appear since it is rendered conditionally with the loading variable. Moreover, in the onExpandChange method, set a 1000ms timeout in order to simulate an API call. Inside the setTimeout method, set the new expanded state and loading variable to false:

Change Theme
Theme
Loading ...
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support