-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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 is not available on android #29055
Comments
can you help me @shergin @mdvacca @davidaurelio to resolve this? |
@nomi9995 sorry, I am no longer involved into RN. |
@davidaurelio can you suggest any other facebook developer? |
The team has changed quite a lot since I left FB. I don’t really know who the right person would be. |
Seems reasonable that this currently iOS only API (https://reactnative.dev/docs/scrollview#maintainvisiblecontentposition) should exist on Android as well. Just needs a PR :) |
@chrisglein I try to make code natively. Is there dev docs because here everything is coming from |
@nomi9995 Hi! Have you tried to make this work on android? |
@sh-helen No, I didn't try I was busy on another project. |
I opened a PR to address this #29466. Feel free to comment or review. |
@nomi9995 @chrisglein I have published a package which is a simple wrapper around |
by @stackia solution, which was inherit in flat-list-mvcp |
Hey everyone, I am a developer at Steuerbot and me and our frontend team are struggling with this issue for a long time, because our app needs to hold the position even if new elements were added at the top of the chat list. So we tried many different other approaches: Clientside-only hacks, patching RN-Core and other things. Finally we came up with a solution, which fixes the issue on our side 🚀 I sharing the link to our developed RN module with you; maybe this will work for your project too 😃 Just give it a try. You can use it as a FlatList-Replacement. We are looking forward to your feedback! |
Thanks to some help from @janicduplessis and a few other people, there's now a PR up to implement |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This is now available in 0.72 |
FlatList automatically scrolls after change data and adds new data in the front or middle of the data list.
it is working on ios if i add
maintainVisibleContentPosition
but this prop is not available on android but i want this prop in android
React Native version:
Describe what you expected to happen:
It shouldn't scroll to new position when I add new items to list, and should keep latest position where user was like maintainVisibleContentPosition on ios
Example code:
Steps To Reproduce
prepend item to list to reproduce the issue on android
Snack, code example, screenshot, or link to a repository:
here is my snack repro code. you can check it on android:
https://snack.expo.io/@nomi9995/flatlisttest
The text was updated successfully, but these errors were encountered: