added overscan property to prefetch files
This commit is contained in:
parent
0a7cc252cb
commit
9ca1f5a683
|
@ -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}>
|
||||||
|
|
Loading…
Reference in a new issue