about summary refs log tree commit diff
path: root/src/view/com/util/List.web.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-07-04 12:12:15 -0700
committerGitHub <noreply@github.com>2024-07-04 20:12:15 +0100
commitca7386967a68574c25cff27cfbdf6a06f108a481 (patch)
tree1221b8ef0aae72347bbd96c9312c7b5980d692a5 /src/view/com/util/List.web.tsx
parentd837f96478dce8f6df03e387fa6d34086b01263f (diff)
downloadvoidsky-ca7386967a68574c25cff27cfbdf6a06f108a481.tar.zst
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>
Diffstat (limited to 'src/view/com/util/List.web.tsx')
-rw-r--r--src/view/com/util/List.web.tsx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/view/com/util/List.web.tsx b/src/view/com/util/List.web.tsx
index e917ab1d3..f2b2add37 100644
--- a/src/view/com/util/List.web.tsx
+++ b/src/view/com/util/List.web.tsx
@@ -365,6 +365,7 @@ function ListImpl<ItemT>(
             root={containWeb ? nativeRef : null}
             onVisibleChange={onTailVisibilityChange}
             bottomMargin={(onEndReachedThreshold ?? 0) * 100 + '%'}
+            key={data?.length}
           />
         )}
         {footerComponent}