palantir/blueprint

Loading state for tree nodes while children are loading asynchronously

Open

#3729 aperta il 9 set 2019

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)TypeScript (2167 fork)batch import
Package: coreType: feature requesthelp wanted

Metriche repository

Star
 (20.263 star)
Metriche merge PR
 (Merge medio 43g 10h) (27 PR mergiate in 30 g)

Descrizione

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.

Guida contributor