Closed answerquest closed 9 years ago
That's an example:
custom_slc_options: {
cols: [3, 5],
texts: [
['na', '0 - 50', '50 - 500', '500 - 15000', '15000 - 25000', '25000 - 100000', '100000 - 1500000', 'not na'],
['na', '0 - 50', '50 - 500', '500 - 15000', '15000 - 25000', '25000 - 100000', '100000 - 1500000', 'not na']
],
values: [
['na', '>0 && <=50', '>50 && <=500', '>500 && <=15000', '>15000 && <=25000', '>25000 && <=100000', '>100000 && <=1500000', '!na'],
['na', '>0 && <=50', '>50 && <=500', '>500 && <=15000', '>15000 && <=25000', '>25000 && <=100000', '>100000 && <=1500000', '!na']
],
sorts: [false, false]
},
It seems to work only when there's just one column number specified. Fails when I try to increase.
I tried a lot of tweaks to
cols:[7],
:cols:[6,7],
,cols:[[6,7]],
,cols:[[6],[7]],
, etc... but none worked. In some cases the TableFilter loads properly with these columns' dropdowns staying the same default ones, in some cases the script crashes and the table loads as original html.This would be for use cases where you have more than one column having numbers in the same ranges, like accounts records. But even in cases of different ranges, it would help to be able to define
custom_slc_options
for more than one column, right? I also tried to repeat the whole object again, Like:..and that gave me a
SyntaxError: invalid property id
Oh, and the
na
,'na
expressions didn't work at my end.. I replaced them with[empty]
and[nonempty]
and they work properly. I had copied from this example: http://tablefilter.free.fr/datademo.htm