-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
FlatList onViewableItemsChanged method does't trigger when first render? #25812
Comments
@wenzhihao123 Check whether any other child component creates an interaction handle. Disabling interaction handle from Child component fixed the problem for me. |
@Ashwin-Mothilal Thanks for your answer, my FlatList has header, and header also has other FlatList, but how to forbid item's FlatList to create an interaction handle? |
I am facing the same issue, even though my The list renders as soon as i scroll even a bit. I tried using the scrollToOffset to simulate a scroll, didn't work either. |
same issue |
Hey, my issue was nothing related to FlatList. Everything was working fine in FlatlList, there was a library that i was using that was forcefully making the list wait for interaction. Basically it was using a interaction handler because of which my list would wait for interaction even though i had my |
I had the same issue and was able to resolve it by adding initialScrollIndex={0.01} to the FlatList. It's dirty but it seems to trigger the onViewableItemsChanged method. Using a value of 0 or going lower than 0.01 also did not trigger the method. |
+1 |
Adding |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
+1 |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Hope this helps Few tips:
|
React Native version: +
Steps To Reproduce
When i used FlatList in Android, when i first entered the page, why onViewableItemsChanged method does't trigger? Generally speaking, first render also means that the visibility of items have changed?
Describe what you expected to happen:
When first enter the page , onViewableItemsChanged method will trigger without scroll event !
My code just like this:
Please write soon, thanks !
The text was updated successfully, but these errors were encountered: