palantir/blueprint

Loading state for tree nodes while children are loading asynchronously

Open

#3,729 建立於 2019年9月9日

在 GitHub 查看
 (6 留言) (0 反應) (0 負責人)TypeScript (20,263 star) (2,167 fork)batch import
Package: coreType: feature requesthelp wanted

描述

Would it work if one was to set the hasCaret prop to whether or not children are available, display a spinner upon onExpand while fetching content from elsewhere, and then replace the spinner with the actual content upon completion?

If so, what would be an elegant way to display a spinner? At first glance, it seems like the only valid type of children are again tree nodes. Those could at least have a label "loading" and be disabled for the time being, however I would much rather prefer a spinner. Could the children prop be used for this?

Thanks for any hints.

貢獻者指南