-
Notifications
You must be signed in to change notification settings - Fork 294
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
maintainVisibleContentPosition Not Working #547
Comments
|
The last missing piece for a almost perfect library :) |
+1 we really need |
+1 I copy repo and make custom bridge for android :/ |
+1, extremely valuable prop... would perfect the library! |
👀 |
…s horizontally
… added to TypeScript
…s horizontally
… added to TypeScript
…s horizontally
… added to TypeScript
…s horizontally
Any news on this one? |
Just ran into this myself. Might need to revert to |
FlashList as of now does not support the For those of you who may need similar functionality, I've published an analysis of this problem and a patch to solve it here; feel free to test it out. Note that instead of attempting to replicate ScrollView's |
Hey team, any updates on this issue? I see there is a fix about an experimental feature supporting MVCP from discord forked repo. Can't we merge it into this? 👀 |
Can you share the fork link @Marvin-Bai |
Here it is. |
If what you're referring to is this branch, the commits appear to be just a squash of this PR, which for the reasons I explain in the link from my above comment, cannot fully solve the issue (with problems like not working well during scrolling and not working if the indexes shift too much). See if my linked fork/patch works well for you, and if it does, it would be great if you added support for my PR to get thoughts and attention of the maintainers. P.S.
Besides these two flaws, my patch addresses a good deal of other edge cases; in the latter part of my explainer, essentially each section corresponds to the presence of an edge case, and how we have dealt with/can deal with it properly. |
…s horizontally
… added to TypeScript
…s horizontally
… added to TypeScript
Would be amazing to get this 🥲 |
Any news on this ? |
Any update? |
1 similar comment
Any update? |
Current behavior
When a
maintainVisibleContentPosition
prop is given to aFlashList
and items are prepended to thedata
array, the user sees the list content move. This can be observed in the video below. On the left tab, we have React Native'sFlatList
, which does not scroll as content is prepended to itsdata
array. On the right tab, we have FlashList, which does scroll as content is prepended, even when providing a validkeyExtractor
and amaintainVisibleContentPosition
of{ minIndexForVisible: 0 }
.maintain-visible-content-position.mov
See https://github.com/nickcherry/flashlist-maintain-visible-content-position for reproducible demo.
Expected behavior
I would expect FlashList to behave like
FlatList
and not scroll when content is prepended to itsdata
andmaintainVisibleContentPosition
is notundefined
.To Reproduce
https://github.com/nickcherry/flashlist-maintain-visible-content-position
Platform:
Environment
1.2.1
The text was updated successfully, but these errors were encountered: