-
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
When the layoutProvider is changed, it keeps moving to the top. #731
Comments
I'm seeing similar behavior when using 3.0.5 with a horizontal recyclerlistview. Haven't debugged the library yet, but when the layoutProvider changes, there is a small jump back at the offset when there is a new layoutProvider. |
There's a flag in layout provider call |
Hi @naqvitalha I started printing out the index and type in the getLayoutTypeForIndex callback of LayoutProvider and it keeps printing the log statements infinitely. |
Hi @naqvitalha After some further debugging, it seems that recyclerlistview is in a cycle due to the following line:
this results in the following behavior:
I'm not sure if this is the same behavior that @jameszamface is seeing, but if I comment the componentDidUpdate in ViewRenderer, this entire cycle does not occur. |
…ndering is used. Otherwise a layout cycle occurs. - Add extra check before calling overrideLayout in RecyclerListView
…is used. Otherwise a layout cycle occurs. (#734) - Add extra check before calling overrideLayout in RecyclerListView Co-authored-by: Kevin Pittevils <kevin.pittevils@androme.be> Co-authored-by: Talha Naqvi <naqvitalha@gmail.com>
@kevin-kp Is this also fixed with your change? If yes, we can close this one too |
Normally, this issue is also fixed; @jameszamface could you confirm this with version 4.1.3? |
This seems required for any deterministic layout provider that updates along with updating dataProvider. But docs and examples lack any mention of this. Anyway:
|
When the layoutprovider is changed, if the size of the content is the same, componentDidUpdate is continuously executed in the ViewRenderer.
If the size of the content is the same when the layoutprovider is changed, it is suspected that the _forceSizeUpdate function is executed while componentDidUpdate is continuously called in the ViewRenderer.
This problem occurs from version 3.2.0-beta.2. (commit 049c297)
The text was updated successfully, but these errors were encountered: