Using useInfiniteQuery from react-query, scrolling to bottom load the next page. I was wondering how to implement this in ChonkyIO a File Browser for React. Wherein, loading the first 50 files/folders in FileBrowser and when the user reach the bottom while they are scrolling, it will load more files/folders.
Tried to add onScroll to the <FullFileBrowser onScroll={handleScroll}/>.
But nothing seems happening. It doesn't render the console log.
const handleScroll = (event) => {
console.log("scrolling...")
}
<FullFileBrowser
files={files}
onScroll={handleScroll}
>
<FileList/>
</ FullFileBrowser>