Open soorajshankar opened 4 years ago
+1 , I'm willing to open a PR for this feature if it'll be seriously considered for merge.
What would be the advantage over controlling loading from the outside?
Off the top of my head, I suppose it's one fewer thing the developer has to configure.
But ultimately the different is that when first loading the application, a user will see "no schema found" for a bit, whereas with the proposed prop, they would see "Loading..." ?
controlling loading from outside
Is there a way to accomplish this without updating this codebase? And yes, it'd be nice to pass a function component to render whatever we want. It could be simple text such as Loading...
, a spinner animation, or whatever.
@sgrove, I see what you're saying now. Instead of loading the explorer, just render our own loading component until the schema load is finished. In that case, yes, this would just be one less thing that has to be configured and styled.
Yeah, currently we also do the same by wrapping another component which shows the loading spinner.
now we need to manually set the layout that matches the size of the explorer, otherwise, UI will look inconsistent when the explorer loads the data.
A simple Loading...
at the place of no schema found
could make the UI more simple and user friendly
currently, it shows
no schema found
until we load the schema, and no way to show a loading mask. (now only we can wrap this with a loading component)