Help with Datatable and LoadNext

Hello,
I am confused with about the Datatable and pagination with append data.

On initialise the datatable I use:
$$(“historylisting”).loadNext(5, 0, null, “connectajax.php?junction=getRunHistory&data1=0”);

This will call on database
Select * FROM run_protocol ORDER BY id DESC LIMIT 0,5

will return right dataset. Shown in datatable the right way.

Now with next button I use
var countItems = Object.keys($$(“historylisting”).data.pull).length;
$$(“historylisting”).loadNext(5, countItems, null, “connectajax.php?junction=getRunHistory&data1=”+countItems);

This will call on database
Select * FROM run_protocol ORDER BY id DESC LIMIT countItems,5

will return right dataset, start fron 5, next .

BUT NOW: Every time the first dataset is shown again and again in the datatable. I expect the LoadNext will append the new data to the datatable and not clone the first one all the time.

Very confusing. Please help.

After reading all parts about datatable, data loading and software forth I was more confused than before. I have now written my own function, with the help of “parse” to fulfill a step by step loading behaviour. The one from webix did not work in any way. Maybe it is damaged or documentation is broken.
However, I suggest to put in the php scripts that are part of you samples, this is easier to understand in compare to do not know what your samples are doing server side.

Hello,

Did you check the related sample? It seems to cover the described use-case. And you can see that the loadNext() method does append new data when it gets from server side.

These samples are available in the downloaded package together with the corresponding NodeJS backend for them (the “backend” folder). You can run the server by:

npm install
npm run server