Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade DataTables to version 2 #1223

Open
TheMadBug opened this issue Jan 13, 2025 · 1 comment
Open

Upgrade DataTables to version 2 #1223

TheMadBug opened this issue Jan 13, 2025 · 1 comment
Assignees

Comments

@TheMadBug
Copy link
Member

We use DataTables for both:

"Client" side HTML (where the server renders out full HTML and then DataTables provides more functionality over the top).
and
Server side where DataTables loads the data as needed off the server, this allows paging, efficient searches etc
We also use a few extensions for DataTables such as fixed headers (so you can see the header when you scroll).

I was looking to update from DataTables 1.x to DataTables 2.x (it provides better client side searching and layout) but there's an extension we use for pagination that has not been updated

See datatable_definition.js $.fn.dataTableExt.oPagination.input = {...}

this allows us to jump instantly to a page number. If we try to run it with the current extension code we get "plugin is not a function" JavaScript error.

Looking at the docs for DataTables paging can be customised by enabling/disabling the auto jumping of nearby page numbers, enabling/disabling the previous and next buttons and enabling/disabling of the first/last buttons. No option for auto-jumping to a page number is provided.
https://datatables.net/forums/discussion/78354

The ability to jump to a random page is very useful for testing and we'd rather keep it.
This is not a high priority issue, but the sooner we can update to 2, the sooner we can update the layouts from the horrible dom format to something much more readable. It will also keep us future proof etc.
For now not intending on acting on this issue, just wanted to record it.

@TheMadBug TheMadBug self-assigned this Jan 13, 2025
@TheMadBug
Copy link
Member Author

There is a plugin for DataTables 2.x to recreate the functionality
https://datatables.net/blog/2024/inputPaging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant