In this test case, when I select Add Condition -> Name -> Equals, how can I display the drop down results in alphabetical order so that it is: 0 N, 12 N, 1 P, 5 P, 7 P, 8 P
It is mixed number and string data, so DataTables will automatically sort by strings. In the case of 1 P and 12 N, which appears to be the one reversed compared to what you are looking for, a space is always sorted before 2, hence 1 P is shown first.
Possibly the natural sorting plug-in might help, but that would then place the 12 N at the end of that list.
I'm not sure what sort comparison would place 12 N before 1 P, but you could perhaps create a sort plug-in that would do it.
Answers
Tried this approach, but it did not work as the searchBuilder disappears: https://live.datatables.net/jovosepe/1/edit
Any feedback would be much appreciated.
It is mixed number and string data, so DataTables will automatically sort by strings. In the case of
1 P
and12 N
, which appears to be the one reversed compared to what you are looking for, a space is always sorted before2
, hence1 P
is shown first.Possibly the natural sorting plug-in might help, but that would then place the
12 N
at the end of that list.I'm not sure what sort comparison would place
12 N
before1 P
, but you could perhaps create a sort plug-in that would do it.Allan