SearchBuilder with Absolute Sorting
SearchBuilder with Absolute Sorting
When SearchBuilder is applied on a numerical column with some empty cells, it can filter for greater than / smaller than etc. conditions. However, when I use absolute sorting numbersType as explained https://datatables.net/plug-ins/sorting/absolute on the same column to ignore empty values when sorting, SearchBuilder seems to interpret the data as strings and can no longer apply greater than / smaller than filters. (This is the same with every sorting plugin when used with SearchBuilder.)
Is there a way to use the absolute sorting plugin with SearchBuilder and to keep the column values numerical?
This question has an accepted answers - jump to answer
Answers
Here is an example of the issue: live.datatables.net/regizelo/1/edit
Column Age has some empty values - The SearchBuilder sees it as string with numbersType type sorting.
Hi @trongart ,
The
columns.searchBuilderType
initialisation option should be able to solve this, but it doesn't appear to be working when I edit your test case. Something isn't right there. I've raised an issue internally (DD-2141 for my reference) and will report back here when there is an update.Thanks,
Sandy
Hi @trongart ,
That should be the issue fixed now as you can see at this example. This will be available in the next SearchBuilder release which we hope will be in the next few weeks. Until then you can access the fix from the nightly builds.
Thanks,
Sandy
Appreciate your quick help @sandy !