I use TablePagination component of Material-UI with React.
But this component doesn't have disabled prop.
I have a boolean loading value, which I want to use as a param to enable or disable arrows in the TablePagination.
How to achieve result like this?
I've tried to just pass disabled prop into TablePagination, but it doesn't work.
There is not a single disabled switch, but you can set the disabled prop of the inner button components like this:
<TablePagination
SelectProps={{
disabled: isDisabled
}}
backIconButtonProps={
isDisabled
? {
disabled: isDisabled
}
: undefined
}
nextIconButtonProps={
isDisabled
? {
disabled: isDisabled
}
: undefined
}
{...}
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With