瀏覽代碼

fix infinite grid scroll condition

Klaudiusz Dembler 4 年之前
父節點
當前提交
71dfd99d85
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/shared/components/InfiniteVideoGrid/InfiniteVideoGrid.tsx

+ 1 - 2
src/shared/components/InfiniteVideoGrid/InfiniteVideoGrid.tsx

@@ -94,8 +94,7 @@ const InfiniteVideoGrid: React.FC<InfiniteVideoGridProps> = ({
   useEffect(() => {
     const scrollHandler = debounce(() => {
       const scrolledToBottom =
-        window.innerHeight + document.documentElement.scrollTop === document.documentElement.offsetHeight
-
+        window.innerHeight + document.documentElement.scrollTop >= document.documentElement.offsetHeight
       if (scrolledToBottom && ready && !loading && !allVideosLoaded) {
         setTargetRowsCountByCategory((prevState) => ({
           ...prevState,