You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior:
The URL does not consistently include both the page and sort parameters. When navigating to a new page, the sort parameters are sometimes missing from the URL, and vice versa.
Bump - I have ran into the same issue using Remix. It took 2 days, but eventually tracked it down to this Pagination component. Not sure how it interferes with useSearchParams exactly, but, I wonder if it has something to do with some internal caching of the onChange event?
Also just run into that problem. Took me like 3 hours to realise that the problemis related to this component. The problem seems to be somehow related to the onChange.
NextUI Version
latest
Describe the bug
Issue:
When using
useSearchParams
fromnext/navigation
to implement pagination, the URL parameters are not consistently updated.Steps to reproduce:
useSearchParams
to get the current page number from the URL's query parameters.Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Just copy the code and try this pagination component.
Expected behavior
Expected behavior:
The URL should always include both the page and sort parameters, regardless of whether you're navigating to a new page or changing the sort option.
expected
but got
Actual behavior:
The URL does not consistently include both the page and sort parameters. When navigating to a new page, the sort parameters are sometimes missing from the URL, and vice versa.
Screenshots or Videos
Ok first see the difference
This is the video where I use nextui
Recording.2024-02-29.114732.mp4
Actual Code with nextui
Upon implementing the same approach with Shadcn, I observed that it works as expected.
Recording.2024-02-29.115159.mp4
Operating System Version
windows, mac
Browser
Chrome
The text was updated successfully, but these errors were encountered: