Pipeline functionality is breaking by using Navigation Input
Pipeline functionality is breaking by using Navigation Input
I'm using Serverside in the Datatable and using the Pipeline Plugin. I created a Goto button & Text to directly jump on the pages. The problem is:
Suppose if I jump to page 18,
1: I am able to get to the next page (eg: 19, 20).
2: But if just go to pages less than 18 (eg: 17, 16), it will not get any records.
What I found is, the requestStart in the pipeline is changed because of the cacheLower:
if ( requestStart < cacheLower ) {
requestStart = requestStart - (requestLength*(conf.pages-1));
if ( requestStart < 0 ) {
requestStart = 0;
}
}
Are there any plugins that can work with Serverside and Pipeline to jump directly to pages?
Answers
Are you using
page()
to set the page that DataTables should draw?Can you link to a test case showing the issue please?
Allan
I'm jumping on Page using Custom Goto Button and Text like this:
dtTable.page('18').draw('page');
It will goto Page 18. But Since I'm using the Custom Goto Functionality, it is now caching the records that Start from 18*20 = 360-20 = 340 to 540.
Since the Cache Value is changed, now when I click the Page 17, it is not working. Please refer to the ScreenShot I have attached for the Page 17. It is showing the Pipeline Plugin on debug.
Are you able to reproduce it in this example?
In the console if I do:
it will trigger a new data request from the server. Then clicking the paging control to go back a page it makes another Ajax request to get the data for that page. That seems correct to me.
Allan