columns.searchBuilderType
Set the SearchBuilder type to use for a column.
Please note - this property requires the SearchBuilder extension for DataTables.
Description
This option allows the type of SearchBuilder conditions to be set for individual columns. Normally SearchBuilder uses the types that DataTables has detected from the columns, when this option is set it just uses its value.
When using serverSide
processing it is important to use this option to maintain consistent conditions across different pages of the table and also to reduce the number of requests to the server.
Possible values include
string
date
num
num-fmt
html
html-fmt
html-num-fmt
moment-...
- Here the...
should be replaced with the moment format that is being used within the column. A format could therefore look something likemoment-DD/MM/YYYY
, spaces are also allowed within the format - anything that is a valid moment format. For examplemoment-DD/MM/YYYY HH:mm
.luxon-...
- As above, the...
should be replaced with the luxon format that is being used within the column. A format could therefore look something likeluxon-DD/MM/YYYY
, spaces are also allowed within the format - anything that is a valid luxon format. For exampleluxon-DD/MM/YYYY HH:mm
.
Type
string
- Description:
If a string value is set then SearchBuilder will use that value to set the type for the column, rather than attempting to detect the type from the table's data.
When using
serverSide
processing it is important to use this option to maintain consistent conditions across different pages of the table and also to reduce the number of requests to the server.
Default
- Value:
undefined
The default value of the columns.searchBuilderTitle
is undefined. This means that as standard SearchBuilder will derive the type directly from the column's data.