Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Table Pagination: Rows per page "All" does not show last item #18258

Closed
2 tasks done
markusf1 opened this issue Nov 7, 2019 · 2 comments · Fixed by #18260
Closed
2 tasks done

[docs] Table Pagination: Rows per page "All" does not show last item #18258

markusf1 opened this issue Nov 7, 2019 · 2 comments · Fixed by #18260
Labels
bug 🐛 Something doesn't work component: table This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation

Comments

@markusf1
Copy link
Contributor

markusf1 commented Nov 7, 2019

  • The issue is present in the latest release. (only in the docs example, not in material-ui library)
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

If you select "All" Rows per page option in the docs example Table > Custom pagination actions (https://material-ui.com/components/tables/#custom-pagination-actions) only 12 of the 13 items are visible. Item KitKat is missing.

Expected Behavior 🤔

All items should be visible.

Steps to Reproduce 🕹

  1. Open https://material-ui.com/components/tables/#custom-pagination-actions
  2. select Rows per page "All"

Bug

If "All" is selected, page is 0 and rowsPerPage is -1 so the line rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage) is rows.slice(0, -1) and the last item get's removed.

markusf1 added a commit to markusf1/material-ui that referenced this issue Nov 7, 2019
@oliviertassinari oliviertassinari added component: table This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation bug 🐛 Something doesn't work labels Nov 7, 2019
@oliviertassinari
Copy link
Member

@markusf1 Thank you for the report :)

@MattiaVio
Copy link

MattiaVio commented Oct 19, 2023

this bug is still reproducible
"@mui/material": "^5.14.8"

page: 0 and rowsPerPage: -1

slice will return slice(-0,-1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: table This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants