The object structure for additional conditions for SearchBuilder.
Please note - this property requires the SearchBuilder extension for DataTables.
This is useful as it allows custom conditions to be added to SearchBuilder should the standard ones not be enough. It also allows for the standard conditions to be removed or edited to fit your own needs. Here the
searchBuilder.conditions[type][cond] is the type for the column, for more details refer to
This object is used to represent a single condition. It is an object which contains 5 properties which define fully the behaviour of the condition. They are as follows
searchBuilder.conditions[type][cond].conditionNameThe string that is to be displayed in the option for this condition.
searchBuilder.conditions[type][cond].initThis function is used to initialise the value element
searchBuilder.conditions[type][cond].inputValueThis function is used to return the value that the values from the table should be compared against
searchBuilder.conditions[type][cond].isInputValidThis function is used to determine if the criteria should be used in the overall filter
searchBuilder.conditions[type][cond].searchThis is the function that compares the row data and the value selected in this criteria.
The standard conditions can be removed, edited or added to. The manual page for custom conditions covers this in detail.
Note: Please also not that custom conditions are not supported when the
serverSide option is set to true.
There are two examples that create custom conditions using initialisation options. They both show how to add a custom condition to the
num column type, but the process is the same for other column types.
There is also an example that shows how to use a plug-in to add a custom condition.
The following options are directly related and may also be useful in your application development.