2

First of all, thank you so much for your support of YADCF. It's a fantastic tool! Second, I'm not a programmer (I know enough to break stuff :D) so I apologize in advance for having to bother you at all. It's possible my question has even already been answered, I just don't know what to search for.

I'm using the YADCF 0.8.8 table on DOM Source (small "d"). I've built a custom_func_filter based on 11 values & labels. The weird thing is, when the drop-down menu displays for the filter, the labels are not in the order they're defined in.

In trying to figure out what the issue was, I changed the values and labels to numbers from 01 - 11 instead of text to see how it was moving things around. Apparently it's anything over 10 items that it begins to jumble everything up. Here's a side-by-side comparison on what it looks like:

custom_func_filter comparison

I'm behind a firewall so it's not easy to share my code, but I'll figure out a way to if need be. I just wasn't sure if there was something I was missing.

Using datatables 1.9.4, jquery 1.11.3.

Thank you!

Teridactyl
  • 21
  • 2

1 Answers1

1

You are welcome :)

Quick answer: Use the sort_as: "none" and make sure the data array is in your desired order

Explanation: BEcause in custom function filtering the select is being populated by (data) array of objects value/label the sort as (as its implemented now) wont really sort the data, so since you populate data manually, just make sure its in your desired order

Daniel
  • 36,833
  • 10
  • 119
  • 200