Issue getting the latest IP-Address sorting working.
Issue getting the latest IP-Address sorting working.
Hi everyone,
I assume this is user error, but I have searched the net and found a few threads here and at stackoverflow, but continue to have issues.
I am trying to sort a column of IP addresses and I am thrilled to discover that this is already an available feature via plug-ins and there is also type detection available! I want to employ both eventually. But, first, I decided I'd snag the latest version of DataTables and the recommended version of jQuery via the handy download tool and get it setup. It setup with ease, and the default DataTables features work amazingly well. I then snagged the plugin, and followed the plugin page example... I think I did it correctly with columnDefs and targets starting with 0 for the first column in the initialization of DataTables. I can't figure out how to get it to sort the IP column as expected.
So, I searched the web to find out what if others have figured it out or to see examples to discover what I was doing incorrectly and found an older example for DataTables 1.11.3 and saw it working great. Started to tinker and long story short, it seems to indicate that the 1.13.4 version of the ip-address plugin is the file that changes behavior.
TL;DR older version of ip-address.js sort plugin works with example and newer does not, is it user error or a bug?
Have this example going on here(which is really neat btw) to demonstrate:
https://live.datatables.net/cifutiti/1/
In the demo, you can swap comment tags to include either the latest version or older of the supporting files (jquery/datatables) before the plugin, but it either works or not depending on if you use 1.13.4(wont work for me) or 1.11.3(works) of the plugin.
Thanks for taking a peek!
This question has accepted answers - jump to:
Answers
https://live.datatables.net/cifutiti/1/edit woops, here is the link that shows the html/etc
No - it is 100% my fault. Sorry! I did a refactor of the plug-ins not too long ago to allow the build to support ES modules, and I missed a parameter that is causing the error!
I have since committed a fix but haven't yet done a release with the change. I'm hoping that release isn't far away, but I've got a bunch of other changes on the go that need to be done insync.
Until then, use the old version - it is functionally the same.
Allan
Latest known working version is 1.13.2
Thanks Allan! Glad I hadn't just goofed, and know that I appreciate all the efforts. I'm over the moon with how it works and so are my users.
I will gladly use the older version and circle back at some point to test the newer out!
TY for the info too, Kvee!