Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a loading option #958
Add a loading option #958
Conversation
coveralls
commented
Sep 25, 2019
•
ed615c7
to
9107a9a
loktar00
commented
Sep 25, 2019
•
The same can be accomplished (visually) by providing a loader (custom ect.) Right before Quick dirty example using the serverside pagination example, as an example. const loadingComponent = (
<div style={{position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)'}}>
<CircularProgress size={24} />
</div>
);
return (
<div style={{position:'relative'}}>
{isLoading && loadingComponent}
<MUIDataTable title={<Typography variant="title">
ACME Employee list
</Typography>
} data={data} columns={columns} options={options} />
</div>
); |
This isn't a feature that I think should be supported at this time. It has come up a few times (Eg: #361 & #466). It's easy enough to add this in and around the table without making it core functionality (see The library needs to leave out some things to keep it from becoming bloating and overcomplicated. When it comes to additional component rendering, I think it's best left to custom renders or author-provided functionality. |
anthonywebb
commented
Oct 3, 2019
@gabrielliwerant it would be helpful in your |
@anthonywebb Agreed, the examples provided are not the best. Would you have any interest in submitting something to enhance the example? I created an issue for this and linked it here. |
joshleblanc commentedSep 25, 2019
This adds a loading option to the table. It defaults to false.
When true, it adds a loader on top of the current table.
This is to facilitate server-side data loading.