added overscan property to prefetch files

This commit is contained in:
Abhinav-grd 2021-02-08 14:38:15 +05:30
parent 0a7cc252cb
commit 9ca1f5a683

View file

@ -385,7 +385,7 @@ export default function Gallery(props) {
} }
} }
}); });
const extraRowsToRender=Math.ceil(2*height/200);
return ( return (
<List <List
itemSize={(index) => itemSize={(index) =>
@ -397,6 +397,7 @@ export default function Gallery(props) {
width={width} width={width}
itemCount={timeStampList.length} itemCount={timeStampList.length}
key={`${router.query.collection}-${columns}-${sinceTime}`} key={`${router.query.collection}-${columns}-${sinceTime}`}
overscanCount={extraRowsToRender}
> >
{({ index, style }) => { {({ index, style }) => {
return (<ListItem style={style}> return (<ListItem style={style}>