palantir/blueprint

Loading state for tree nodes while children are loading asynchronously

Open

#3,729 opened on Sep 9, 2019

View on GitHub
 (6 comments) (0 reactions) (0 assignees)TypeScript (2,167 forks)batch import
Package: coreType: feature requesthelp wanted

Repository metrics

Stars
 (20,263 stars)
PR merge metrics
 (Avg merge 43d 10h) (27 merged PRs in 30d)

Description

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.

Contributor guide