Datatable Dynamic Load onDataRequest malfunction

Hi webix team, in snippet https://snippet.webix.com/3i0xfrzd I have a Datatable with Dynamic Load and two malfunctions. 1. When you scroll fast the onDataRequest fires several times. 2. When you scroll fires first the onDataRequest and then the function loadData - see message “Load1” in Line 21.
Thanks for help

Hey @RainerRoss, as far as I can see in your example you are continuously issuing requests on onDataRequest without waiting for them to resolve first, so it basically loops over itself making requests → firing off onDataRequest from those requests until the promise is resolved. I’ve tried to fix your problem by using async/await, please take a look at this snippet: https://snippet.webix.com/myywi1kh. I’m not really sure of the best way to handle this, but I recommend you take a look at the loadNext API - https://docs.webix.com/api__link__ui.proto_loadnext.html.

Hey @Dzmitry, thanks for your advice. To do this with loadNext is a good idea but I need a example with loadNext and POST Request and additional Parameters

You can read more about implementing a custom dynamic loading here - https://blog.webix.com/dynamic-loading-fetching-unlimited-number-of-records-from-server-side/, it includes a use-case for loadNext, the code formatting is a bit off in the post itself, but the example is fully working and has all of the code in it.