JohnTendik / jtrt-tables

A Wordpress plugin to help users create responsive tables without having to read or write code.
GNU General Public License v2.0
22 stars 6 forks source link

Unable to sort table: e.push is not a function #34

Closed ottosson closed 7 years ago

ottosson commented 7 years ago

I'm having trouble with sorting table columns. Nothing happens when I push the sort buttons and I get a console error: Uncaught TypeError: e.push is not a function

I'm using WordPress 4.7.3 and JTRT 4.1

JohnTendik commented 7 years ago

Hey thanks for letting me know, is this happening for "column hiding" responsive option or the regular scroll/stack? I'll do some testing and get back to you asap.

JohnTendik commented 7 years ago

Hey ottosson,

I found out the problem, I will include this fix in the future update but for now you can fix this by adding an order option to the DataTable options located in jtrt-responsive-tables-public.js file

order:[],

after

"ordering":isSorted, so it should look like this "ordering":isSorted, "order": [],

simply add the option "order" which will hopefully solve your issue.

Let me know if this helps,

thanks again for bringing this to my attention! John

ottosson commented 7 years ago

Awesome! Thanks for the fast reply. Works like a charm!

sonianand11 commented 5 years ago

Works for me. Thank you @JohnTendik