简体   繁体   中英

How to load billions of records easily in handsontable in sinatra using mongo?

I used handsontable to load thousand of records. When i load page, it will take lots of time to load. So, my question is: Is there any buffer functionality to buffer some data once then some other while scroll? I am trying to load "100" data while first time refresh. Then while scroll, it will fetch another "100" records. But it will not work. Please help me out.

Thanks

What you are looking for is called infinite scroll and handsontable seems to have all the tools needed to build support for it. Read their documentation's Function datasources section. You will need to implement the lazy loader yourself though.

The feature has been requested couple of years ago, but has not been implemented yet. Some have written plugins with a support .

Alternatively, implement it in the form of pagination . Handsontable already has the support . When user clicks on the other page link, load it through AJAX and feed it back to Handsontable. The link above has an example, just add your ajax call.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM