How to Implement Lazy Loading with TreeSelect?
Posted: 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: https://codesandbox.io/s/pqzmt?file=/sr ... 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.
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.