Extend pagination with a "virtual router"

Extend pagination with a "virtual router"

Luciano983Luciano983 Posts: 2Questions: 2Answers: 0

Hi there, I'd like to extend DataTable server-side pagination in order to obtain a URL with a query string like ?page=n. I'm already doing this with plain-jquery but i'd like to encapsulate this functionality in a plugin.

Basically I listen to page.dt event and use window.history.pushState to update the param in query string. Then listening popstate to handle browser back-button and restore pagination to previous state.

I've checked the docs https://datatables.net/manual/plug-ins/ but I don't get how to extend pagination without touching the default behavior.

Can somebody give me a clue? Thanks!

This discussion has been closed.