scroll logic simplification
This commit is contained in:
parent
08249c183e
commit
35605fc2b3
2 changed files with 7 additions and 7 deletions
|
@ -69,14 +69,14 @@ export default function ClaimList(props: Props) {
|
|||
x &&
|
||||
mc &&
|
||||
(window.scrollY + window.innerHeight >= x.offsetHeight ||
|
||||
x.offsetHeight - mc.offsetHeight > PADDING_ALLOWANCE)
|
||||
x.offsetHeight - mc.offsetHeight > PADDING_ALLOWANCE) &&
|
||||
!loading &&
|
||||
urisLength >= pageSize
|
||||
) {
|
||||
if (!loading && urisLength >= pageSize) {
|
||||
onScrollBottom();
|
||||
onScrollBottom();
|
||||
|
||||
// Save that we've fetched this page to avoid weird stuff happening with fast scrolling
|
||||
setScrollBottomCbMap({ ...scrollBottomCbMap, [page]: true });
|
||||
}
|
||||
// Save that we've fetched this page to avoid weird stuff happening with fast scrolling
|
||||
setScrollBottomCbMap({ ...scrollBottomCbMap, [page]: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -845,4 +845,4 @@
|
|||
"If you are having issues, checkout our %help% or email us at %email%.": "If you are having issues, checkout our %help% or email us at %email%.",
|
||||
"Wrong password for %email%": "Wrong password for %email%",
|
||||
"Legacy Licences": "Legacy Licences"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue