-
Notifications
You must be signed in to change notification settings - Fork 427
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
initialRenderIndex makes content jump around when non deterministic #241
Comments
Unfortunately, this feature won't work perfectly in non deterministic scenario. The reason is it will become important to skip multiple frames to allow layout to settle down because of async measure. If it's too important you can hide the ListView to 2-3 frames and then call scrollTo again. In future we'll see how we can deal with this. There is a parallel JS scrollview project that we are working on which can potentially fix this. |
@naqvitalha what do u mean by waiting and then call scrollTo again? You mean not use the initialRenderIndex? Is the other project you are working going to be part of RLV? Can we see a sneak peek anywhere? |
Hi @tafelito I see you are working on a chat app. Did you find any good solution for a displaying a large list of chat ? |
Hi @tafelito , did you got any solution for this. |
@naqvitalha any update on this ? |
@callmemonky in case of having chat, I don't think we can add accurate dimensions, as a text can be as short as two lines or as long as 10 lines |
I've published an analysis of this problem and a patch here; feel free to test it out. |
When using initialRenderIndex or initialOffset to scroll to the bottom on initial render, using forceNonDeterministicRendering makes content to re accommodate and jump around if the provided estimated height is not close to the final height. This does not happen when not using either initial index or offset.
Sometimes its not possible to know the height beforehand or even an estimated value, like in a chat app.
How would you prevent this?
The text was updated successfully, but these errors were encountered: