Fix onEndReached not firing sometimes on web (#4728)

* handle off screen visibility observer.

* Revert "handle off screen visibility observer."

This reverts commit e499ea0ed66b31964f79261b41f58a288b0cdb6f.

* key ftw

* Remove special case

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
This commit is contained in:
Hailey 2024-07-04 12:12:15 -07:00 committed by GitHub
parent d837f96478
commit ca7386967a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 10 deletions

View file

@ -365,6 +365,7 @@ function ListImpl<ItemT>(
root={containWeb ? nativeRef : null}
onVisibleChange={onTailVisibilityChange}
bottomMargin={(onEndReachedThreshold ?? 0) * 100 + '%'}
key={data?.length}
/>
)}
{footerComponent}