fix empty blocks due to virtualization in rare cases (#4207)

This commit is contained in:
rahulramesha 2024-04-16 15:50:06 +05:30 committed by GitHub
parent 01f7328714
commit b9314889d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,7 +48,7 @@ const RenderIfVisible: React.FC<Props> = (props) => {
// } else {
// setShouldVisible(entries[0].isIntersecting);
// }
setShouldVisible(entries[0].isIntersecting);
setShouldVisible(entries[entries.length - 1].isIntersecting);
},
{
root: root?.current,