CNFeffery / feffery-antd-components

Dash + Ant Design = 😍
http://fac.feffery.tech
MIT License
317 stars 24 forks source link

AntdTreeSelect: Add support for lazy loading tree node #222

Closed fishb1 closed 2 months ago

fishb1 commented 2 months ago

Ant Design TreeSelect component has a feature for asynchronous loading of tree nodes.

ezgif-5-b06e8aee7f

You can define a callback function loadData for the component and the function is called when a non-leaf tree node is expanded. It is also loading indication displayed until the function returns the result.

image

It would be really helpful to have this feature in AntdTreeSelect.

CNFeffery commented 2 months ago

@fishb1 Starting from version 0.3.6, fac supports it. Relevant examples:

https://fac.feffery.tech/AntdTreeSelect#demo-container-async_load_node https://fac.feffery.tech/AntdTree#demo-container-async_load_node