-
Notifications
You must be signed in to change notification settings - Fork 282
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
Add experimentalMaintainTopContentPosition
support to FlashList
#772
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
friyiajr
changed the title
Maintain position ios v2
Add Feb 25, 2023
experimentalMaintainTopContentPosition
support to FlashList
friyiajr
force-pushed
the
maintainPositionIos-v2
branch
from
February 25, 2023 16:29
2789d52
to
f36433a
Compare
Great work! This is exactly what I need. I don't see any android code changes, is this iOS only prop? |
@arthurgeron-work for now yes it is. We are currently working on Android |
Great work! Does this work with inverted={true} |
friyiajr
force-pushed
the
maintainPositionIos-v2
branch
from
March 30, 2023 02:23
f36433a
to
618c31c
Compare
…s horizontally
… added to TypeScript
friyiajr
force-pushed
the
maintainPositionIos-v2
branch
from
March 30, 2023 20:32
618c31c
to
e2d1699
Compare
and this is what i need, thanks for creating this PR man |
ETA for when this will be merged? Awesome PR! |
Closed in favor of this PR which addresses iOS and Android #824 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes (#547)
This pull request adds experimental support for a prop called
experimentalMaintainTopContentPosition
. This prop will maintain the position of the list when items are added from the top down. UnlikemaintainVisibleContentPosition
in React-Native we don't allow the user to specify a target for where they want the anchor to be. We always specify it as the top.Reviewers’ hat-rack 🎩
Run tests in release mode. In debug mode there can be some flashing from
clearGaps
experimentalMaintainTopContentPosition
, add akeyExtractor
and make sure you can maintain the position of the list when adding items to the front of the arrayHere is an example of the playground I was using for testing
List.tsx
ListDebugPlayground.txt
Screenshots or videos (if needed)
The app working Vertically:
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-02-25.at.11.15.58.mp4
The app working Horizontally:
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-02-25.at.11.19.40.mp4
Checklist