|
|
|
@ -66,9 +66,9 @@ const Datasets = ({
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
const onScroll = debounce(() => {
|
|
|
|
const onScroll = debounce(() => {
|
|
|
|
if (!loadingStateRef.current) {
|
|
|
|
if (!loadingStateRef.current && containerRef.current && anchorRef.current) {
|
|
|
|
const { scrollTop, clientHeight } = containerRef.current!
|
|
|
|
const { scrollTop, clientHeight } = containerRef.current!
|
|
|
|
const anchorOffset = anchorRef.current!.offsetTop
|
|
|
|
const anchorOffset = anchorRef.current.offsetTop
|
|
|
|
if (anchorOffset - scrollTop - clientHeight < 100)
|
|
|
|
if (anchorOffset - scrollTop - clientHeight < 100)
|
|
|
|
setSize(size => size + 1)
|
|
|
|
setSize(size => size + 1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|