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

[material-ui][TablePagination] TablePagination component throws You have provided an out-of-range value 4 for the select component. warning #42542

Closed
pat-kasprzyk-kiefa opened this issue Jun 5, 2024 · 1 comment
Labels
component: pagination This is the name of the generic UI component, not the React module! component: TablePagination The React component.

Comments

@pat-kasprzyk-kiefa
Copy link

pat-kasprzyk-kiefa commented Jun 5, 2024

Steps to reproduce

Link to live example: (required)

Steps:

  1. Setup the TablePagination Component
  2. Set a rowsPerPageProp to any value that is not 10`, `25`, `50`, `100

Current behavior

image

Expected behavior

No error messages regardless of what the rowsPerPage prop is

Context

I would like the following warning to go away:

image

Your environment

package.json ``` "@mui/base": "^5.0.0-beta.18", "@mui/icons-material": "^5.14.12", "@mui/lab": "^5.0.0-alpha.147", "@mui/material": "^5.15.17", "@mui/x-data-grid": "^6.16.1", "@mui/x-data-grid-pro": "^6.16.1", "@mui/x-date-pickers": "^6.16.1", "@mui/x-date-pickers-pro": "^6.16.1", ```

Search keywords: TablePagination, out-of-range value

@pat-kasprzyk-kiefa pat-kasprzyk-kiefa added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 5, 2024
@pat-kasprzyk-kiefa
Copy link
Author

Shortly after I created this issue I realized that you can pass [-1] to rowsPerPageOptions and that will get rid of this warning. You guys can disregard!

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 5, 2024
@pat-kasprzyk-kiefa pat-kasprzyk-kiefa changed the title [material-ui][TablePagination] TablePagination component throws You have provided an out-of-range value 4 for the select component. error if rowsPerPage isn't 10, [material-ui][TablePagination] TablePagination component throws You have provided an out-of-range value 4 for the select component. error Jun 5, 2024
@pat-kasprzyk-kiefa pat-kasprzyk-kiefa changed the title [material-ui][TablePagination] TablePagination component throws You have provided an out-of-range value 4 for the select component. error [material-ui][TablePagination] TablePagination component throws You have provided an out-of-range value 4 for the select component. warning Jun 5, 2024
@zannager zannager added component: pagination This is the name of the generic UI component, not the React module! component: TablePagination The React component. labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pagination This is the name of the generic UI component, not the React module! component: TablePagination The React component.
Projects
None yet
Development

No branches or pull requests

2 participants