How to Implement Lazy Loading with TreeSelect?

UI Components for React
Post Reply
Posts: 1
Joined: 08 Apr 2021, 16:34

28 Apr 2021, 08:32

I'd like to use lazy loading with the new TreeSelect component. It has a "leaf" property that's documented as being "used for lazy loading." I have a list of childless TreeNodes. When leaf = false, I can click on the node and it will show a blue circle. When leaf = true, it just selects the node. Is there a way to click on the node and lazy-load its child nodes? The onNodeExpand event doesn't fire unless the node already has children. Code sandbox: ... Select.tsx.

Edit: I got more details running this in my own environment. Setting the 'leaf' property to false enables the expand/collapse button, but the onNodeExpand event never fires.

Posts: 4710
Joined: 29 Jun 2013, 12:38

07 May 2021, 00:44


Fixed for the next version. Details;

Best Regards,

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest