-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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][Pagination] When i change page manually, Pagination component render many PaginationItem instead a few #43542
Comments
Could you provide a minimal reproduction? It helps us troubleshoot. A live example would be perfect. This StackBlitz sandbox template may be a good starting point. |
The issue is that you're passing - setPage(pageInputRef?.current?.value);
+ setPage(Number(pageInputRef?.current?.value)); See the updated StackBlitz: https://stackblitz.com/edit/stackblitz-starters-a6ycet?file=src%2FApp.tsx
Are you saying it worked in a previous version? |
👋 Thanks for using this project! We use GitHub issues exclusively as a bug and feature requests tracker, however, For support with Material UI please check out https://mui.com/material-ui/getting-started/support/. Thanks! If you have a question on Stack Overflow, you are welcome to link to it here, it might help others. |
Thanks. you can internally convert to number for prevent bug.
… Closed #43542 <#43542> as not
planned.
—
Reply to this email directly, view it on GitHub
<#43542 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3VALH4SPOJXEEOOL3FQCDZUVOLRAVCNFSM6AAAAABNNYRV6KVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGEYTAMZQGM3TOMY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The |
I mean to convert number if pass string.
Number(...)
…On Tue, Sep 3, 2024, 12:43 PM Zeeshan Tamboli ***@***.***> wrote:
The page prop in the Pagination component accepts a number. The input
value (HTMLInputElement.value) which you access through ref is a string.
So internally it is a number.
—
Reply to this email directly, view it on GitHub
<#43542 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3VALEURU3IODP765IETUTZUV4VDAVCNFSM6AAAAABNNYRV6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRWGAYDMNJXGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You shouldn't pass a string value. |
Steps to reproduce
Link to live example: https://stackblitz.com/edit/stackblitz-starters-sgbeob?file=package.json,src%2FApp.tsx
Steps:
1.
2.
3.
Current behavior
When i change page manually Pagination component render many PaginationItem instead a few.
Expected behavior
I expect work such before
Context
No response
Your environment
npx @mui/envinfo
</det
ails>
Search keywords: pagination
The text was updated successfully, but these errors were encountered: