Skip to content

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

@markusf1

Description

@markusf1
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to the documentation.scope: tableChanges related to the table.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions