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

Doesn't work with MUI v5 / React Router Dom 6.21.1 #3

Open
Virthuss opened this issue Jan 19, 2024 · 4 comments
Open

Doesn't work with MUI v5 / React Router Dom 6.21.1 #3

Virthuss opened this issue Jan 19, 2024 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@Virthuss
Copy link

As title says.
I'm trying to restore the scroll within a MUI table but it doesn't seem to work with the package versions mentioned in the title.
The ScrollRestoration from React Router Dom would work for the window.body but i did need this feature for tables as well.
Trying to play around with query selector didn't work, nor did trying to select different components to restore the scroll to.
Besides this, I see in the session storage that the library does save scrolling position ( stacking them instead of re-using them however ), but browsing back to / directly to a page doesn't restore my scrolls.
Is there a working example available for React Rouer Dom 6.21.xxx ? As this feature is not supported by React Router Dom in its current state this library would have helped a lot.

@kentcdodds kentcdodds added the help wanted Extra attention is needed label Jan 19, 2024
@kentcdodds
Copy link
Member

Hello @Virthuss, could you make a reproduction somewhere?

@bartley20
Copy link

bartley20 commented Feb 3, 2024

Hello @kentcdodds, I will try and create a reproduction of the app I have in which the issue is occurring in this weekend. I was able to get the react-router-dom working in this environment with a patch, but I'd really like to use a solution that doesn't involve patching a package. So if you're willing to help me figure out why this isn't working, I'll make a reproduction. One thing I noticed when looking at the session storage was that the page positions were updating when the page refreshed, not when the element I was keeping track of scroll position had changed to another page.

@kentcdodds
Copy link
Member

It should only update when you navigate

@kentcdodds
Copy link
Member

Thanks for working on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants