-
-
Notifications
You must be signed in to change notification settings - Fork 349
Adapt default logic to adjust scroll position only on backward scrolling #1002
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
Conversation
🦋 Changeset detectedLatest commit: c7ef283 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
View your CI Pipeline Execution ↗ for commit c7ef283.
☁️ Nx Cloud last updated this comment at |
@balzdur Yeah, I think this makes sense as the default behavior. Adjusting the scroll position only during backward scrolling seems more intuitive and prevents unexpected jumps when resizing items. Regarding the breaking change, good question! It technically changes the default behavior, but I believe it's more of a bug fix than a breaking change since the current behavior is often not what users expect. |
Is it ok to merge this or do I need to make some stuff ? 🙂 |
@balzdur looks like with this change we broke bidirectional lists, for example, in chat apps where scrolling upward loads older messages. Even without actively scrolling, we should stay in the same place after new elements are loaded. See this related discussion: #1013 (reply in thread) |
This change is based on those issues: #910, #562
It tries to implement the idea from this message:
Originally posted by @piecyk in #910
Disclaimer: I'm not an expert of the lib, neither someone used to contribute a lot to open source (and/or on tanstack repositories). In particular, I do not know if this should be considered breaking (since the default behaviour will change) or not.