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

[FIX] Paging error on clicking ellipsis #12

Open
GeertHauwaerts opened this issue Jul 25, 2020 · 0 comments
Open

[FIX] Paging error on clicking ellipsis #12

GeertHauwaerts opened this issue Jul 25, 2020 · 0 comments

Comments

@GeertHauwaerts
Copy link

When clicking on the ellipsis (even when it's disabled, it's a link), you receive the following error: DataTables warning: table id=DataTables_Table_0 - Unknown paging action: ellipsis.

This can be fixed by preventing ellipsis from being pased to the draw function by adding this filter a.data.action !== 'ellipsis'.

I wanted to issue a PR, but there are no build instructions on how to create the minimized JS file. Here is a working diff on the main JS.

diff --git a/js/dataTables.bulma.js b/js/dataTables.bulma.js
index 963c359..85ebbe9 100644
--- a/js/dataTables.bulma.js
+++ b/js/dataTables.bulma.js
@@ -31,7 +31,7 @@
       q = function(d, f) {
         var l, h, i, c, m = function(a) {
           a.preventDefault();
-          (!b(a.currentTarget).is("[disabled]") && !b(a.currentTarget).is("#table_ellipsis")) && o.page() != a.data.action && o.page(a.data.action).draw("page")
+          (!b(a.currentTarget).is("[disabled]") && !b(a.currentTarget).is("#table_ellipsis")) && (a.data.action !== 'ellipsis') && o.page() != a.data.action && o.page(a.data.action).draw("page")
         };
         l = 0;
         for (h = f.length; l < h; l++)
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