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

Nova 5: Using Filters and Sorting does not preserve scroll position #6659

Closed
Mihkel100 opened this issue Jan 9, 2025 · 7 comments
Closed
Labels
bug Verified bug by the Nova team fix incoming A fix is in review

Comments

@Mihkel100
Copy link

  • Laravel Version: 11.37.0
  • Nova Version: 5.1.1
  • PHP Version: 8.4.1

Description:

When using Filters or Sorting, the scroll position is not preserved. The page jumps to the top.

@crynobone
Copy link
Member

It's impossible to control this since we can only trigger router.push() to Inertia with limited options.

@Mihkel100
Copy link
Author

Mihkel100 commented Jan 9, 2025

There is preserveScroll propery
https://inertiajs.com/manual-visits

@crynobone
Copy link
Member

already set to true

@Mihkel100
Copy link
Author

Interesting. It worked on Nova 4.

@crynobone
Copy link
Member

We were using Inertia.js 0.6 for Nova 4 and now it's Inertia.js 2 for Nova 5.

@Mihkel100
Copy link
Author

Mihkel100 commented Jan 9, 2025

In InteractsWithQueryString.js on line 21 there is reserveScroll: true but it should be preserveScroll: true.

@smartens80
Copy link

smartens80 commented Jan 9, 2025

The functionality as it sits now is an upgrade blocker for us, can't have a scroll to top of screen on these actions, breaks the UX completely. Scroll also occurs when you click a page number with pagination links

@crynobone crynobone added bug Verified bug by the Nova team fix incoming A fix is in review and removed blocked labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Projects
None yet
Development

No branches or pull requests

3 participants