onScroll event Chonky IO FileBrowser

35 Views Asked by At

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>
0

There are 0 best solutions below