Prevent Inertia from replacing the url #779
ltraccard-dynadmic
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
I'd love to have this. It looks like at the moment when inertia/packages/core/src/router.ts Line 457 in 2595fa3 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I found a solution where adding this router hook outside of |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to implement a page where I load a resource with an infinite scroll. Everything is working fine, except for one little thing.
Visiting /users will render the first 25 users, scrolling down will load page 2, the received dataset will be added to the initial dataset and the url will be rewritten to /users?page=2, and so on.
I do not offer any other way to navigate trough the dataset, so the problem occurs when you access a page with a page parameter.
Visiting /users?page=2 will render the users from 26 to 50, it's now impossible to access the first 25 users with infinite scrolling.
I found a fix but the url is now flashing.
I will be great if we could prevent Inertia from replacing the state, or some given parameters. I can make a PR if you think it could be a good addition to Inertia.
Beta Was this translation helpful? Give feedback.
All reactions