omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
251 stars 113 forks source link

How can I pass the pagenr to the server #225

Closed pluk77 closed 2 years ago

pluk77 commented 3 years ago

In order for the data that is coming back from a web-service to show in a data-table, we created our custom adapter. This all works wonderful, but now we have an API that requires us to provide it with the page nr instead of an offset / page-length.

Is there a way to pass the 'page-number' instead of or in addition to 'start' and 'length' back to the server as the user clicks on the pagination buttons at the bottom of the page?

Once this comes back from the client, we can extend the State object to include this new variable and use that to request the correct page from the API

curry684 commented 2 years ago

Not really, we depend on the calls made by DataTables itself. This can only be patched on their end.