searchBuilder.getDetails()
Get the details of the current search setup.
Please note - this property requires the SearchBuilder extension for DataTables.
Description
This method provides the ability to get the details of the data structure and search criteria that is being applied to the DataTable by SearchBuilder's filtering.
Since version 1.2.0 searchBuilder.getDetails()
takes one optional argument, deFormatDates
. This is a boolean flag that when true
deformats dates ISO 8601. The object that is returned represents all of the groups and criteria that are in place. The object can be passed into the searchBuilder.rebuild()
function to make SearchBuilder reset to the point at which the object was created.
The object structure is the same as would be used for preDefined searches - see SearchBuilder.Criteria
.
Type
function searchBuilder.getDetails()
- Description:
Gets the details of the current search.
- Parameters:
Name Type Optional 1 deFormatDates
Yes - default:false Boolean flag that indicates whether to de format any dates that are found into an ISO 8601 format.
- Returns:
Returns an object containing the details of the current search.
Examples
Get the details of a Search::
var dt = new DataTable('#myTable', {
layout: {
top1: 'searchBuilder'
}
});
var d = dt.searchBuilder.getDetails();
Get the details of a Search and de-format dates::
var dt = new DataTable('#myTable', {
layout: {
top1: 'searchBuilder'
}
});
var d = dt.searchBuilder.getDetails(true);
Related
The following options are directly related and may also be useful in your application development.