searchBuilder.preDefined.criteria.value
Define the value to be selected.
Please note - this property requires the SearchBuilder extension for DataTables.
Description
This property allows the values to be set for preDefined searches. searchBuilder.preDefined.criteria.value
is an array so that conditions that require multiple inputs, such as Between
, can be set. For conditions that only require a single input, the array will only require one value. For conditions that require multiple inputs, such as Between
the inputs shall be populated in the same order as the items are set in this array.
For more information on preDefined searches please refer to the searchBuilder.preDefined
option or the manual page.
Type
Default
- Value:
undefined
Examples
Defining the value for use in a criteria:
$('#example').DataTable( {
dom: 'Qlfrtip',
searchBuilder: {
preDefined: {
criteria:[
{
condition: '=',
data: 'Office',
value: ['Edinburgh']
}
],
logic: 'AND'
}
}
});
Defining the values for use in a multi-value criteria:
$('#example').DataTable( {
dom: 'Qlfrtip',
searchBuilder: {
preDefined: {
criteria:[
{
condition: 'Between',
data: 'Start Date',
value: ['2020-05-12', '2001-10-17]
}
],
logic: 'AND'
}
}
});
Related
The following options are directly related and may also be useful in your application development.