SearchBuilder Conditions
SearchBuilder Conditions
Hello,
I am trying to remove a lot of the default conditions from the Conditon dropdown menu on searchBuilder. But following the docs doesn't seem to work for me.
pageLength: 50,
lengthMenu: [[5, 15, 25, 50, 100, -1], [5, 15, 25, 50, 100, 'Show all']],
colReorder: true,
dom: '<"#search-pane.hidden"P><"#search-builder.hidden"Q>' + 'Bfrtip',
searchBuilder: {
conditions: {
string: {
'!null': null,
'not': null,
'>=': null,
'>': null,
'<=': null,
'<': null,
'null': null,
'between': null,
'!between': null
},
num: {
'!null': null,
'not': null,
'>=': null,
'>': null,
'<=': null,
'<': null,
'null': null,
'between': null,
'!between': null
},
html: {
'!null': null,
'not': null,
'>=': null,
'>': null,
'<=': null,
'<': null,
'null': null,
'between': null,
'!between': null
},
}
},
language: {
searchBuilder: {
button: {
0: '<i class="fa fa-cog" aria-hidden="true"></i> Advanced',
1: '<i class="fa fa-cog" aria-hidden="true"></i> Advanced (1)',
_: '<i class="fa fa-cog" aria-hidden="true"></i> Advanced (%d)'
},
}
},
When on https://datatables.net/extensions/searchbuilder/plugins and I try to click searchBuilder.conditions[type].conditionName takes me to a 404 page along with several links on that page.
I am just trying to figure out 1.) How to make EQUALS the default selected condition and 2.) How to remove multiple conditions from multiple types.
Thanks in advance!
Answers
It seems to be working here. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.
Thanks for pointing out the links - we'll take a look and resolve that.
Cheers,
Colin
Colin,
Thanks for responding... However it doesn't seem like it works with html-num or num-fmt. Take a look at http://live.datatables.net/cixakora/4
Am I missing something?
I think it does, it just looks like
!=
was missed: http://live.datatables.net/cixakora/7/edit . Try selecting the salary column - you will see there is now only an "Equals" option.There isn't yet a way to have an option as a default for the condition logic. That is something I plan to add in future.
Allan