searchBuilder.logic
Set the default logic operator.
Please note - this property requires the SearchBuilder extension for DataTables.
Description
This option allows for the default logic of all groups to be set when they are initialised. This can take the value of either AND
or OR
. As default AND
logic is used because it is the most predominant form to use when searching a dataset.
When using searchBuilder.preDefined
searches, this value is also used if searchBuilder.preDefined.logic
is not defined in the initialisation.
Type
Default
- Value:
AND
The default value for the searchBuilder.logic
option is AND
meaning that as standard the initial logic applied to groups will be AND
logic.
Example
Setting the default logic to 'OR':
$('#example').DataTable( {
searchBuilder: {
logic: 'OR'
},
dom: 'Qlfrtip'
});