[TablePagination] Negative amount of items #8431
Labels
bug 🐛
Something doesn't work
component: table
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
If table doesn't have any items – label with negative amount of items appears, after changing "row per page".
Current Behavior
Screenshot: https://tppr.me/RcnqD
Steps to Reproduce
How to fix
https://github.com/callemall/material-ui/blob/v1-beta/src/Table/TablePagination.js#L122
On this line result will be -1, if count is 0.
Using Math.max(0,) have to fix this bug.
Environment
The text was updated successfully, but these errors were encountered: