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
So because the page is scrolling to the top (and emulating a new page render), would it make sense to reset the focus to the top of the page?
The kicker here is that I could attempt to do this myself, but here's some sample code:
const history = withScroll(createHistory(), (prevLocation, location) => {
// scroll to top when visiting a new page
// except for month section on the calendar page
const prevPath = prevLocation ? prevLocation.pathname : null;
const path = location.pathname;
return !prevPath
|| !(prevPath.includes('/random-page/') && path.includes('/random-page/'))
? [0, 0] : false;
});
Basically this is just the scroll logic, but in some instances we don't want to scroll to the top. So it would make sense for this piece of functionality to be bundled with withScroll as some sort of boolean we would pass. Thoughts?
(side note: I am using this version, and I'll eventually want to use the react specific version of this package, but this is what I'm using now)
The text was updated successfully, but these errors were encountered:
So because the page is scrolling to the top (and emulating a new page render), would it make sense to reset the focus to the top of the page?
The kicker here is that I could attempt to do this myself, but here's some sample code:
Basically this is just the scroll logic, but in some instances we don't want to scroll to the top. So it would make sense for this piece of functionality to be bundled with
withScroll
as some sort of boolean we would pass. Thoughts?(side note: I am using this version, and I'll eventually want to use the react specific version of this package, but this is what I'm using now)
The text was updated successfully, but these errors were encountered: