I also have the ColumnFilterWidgets Plugin installed.
But the dropdown is still sorted wrong.
thanks for your post, and sorry for the trouble.
But shouldn’t the dropdowns containing numbers be sorted by numbers?
The engine versions in the following example are sorted correctly, why not my simple list of numbers?
the “Engine Version” in that link is actually also sorted as text, if you look closely.
Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
Columns Speicherplatz and RAM for example.
These columns show the problem nicely! They are not plain numbers, but have text in them (like GB and so on). Due to this, the values are sorted as text strings and not as numbers. Unfortunately, I don’t know a way to change this in the dropdowns.
One idea for a workaround would be to add extra columns to your table, that we hide e.g. with CSS code. In those columns, you would only put the number, without the GB and so on. Then, you could use the datatables_columnfilterwidgets_exclude_columns Shortcode parameter that is mentioned on the Extension’s web page at https://tablepress.org/extensions/datatables-columnfilterwidgets/ to hide the dropdowns with the wrong sort order.
thanks for the suggestion but thats what I’m already doing. I have two columns for Speicherplatz. One with GB and another without GB. If you click on the column title “Speicherplatz” you’ll see that it sorts nicely. It simply doesn’t sort the dropdown correctly.
ah, I see, I hadn’t realized that. Unfortunately, I don’t really know a solution here then 🙁 Sorry. You’d most likely have to modify the JS code of the ColumnFilterWidgets script then.
no problem! Sorry that I could not offer a solution here.