searchPanes.layout
Set the layout of how the panes are displayed on the page.
Please note - this property requires the SearchPanes extension for DataTables.
Description
This option is an alias to searchPanes.layout
, which should be preferred when using DataTables 2+. It can be used to configure SearchPanes regardless of how the panes are inserted into the document (layout
or searchPanes
).
Please refer to the documentation for searchPanes.layout
for full details of this option.
Type
string
- Description:
This property has a variety of possible values. The default value is
'auto'
When this is in place, SearchPanes will fit the panes to their best fit on the page, including responsively. By setting thesearchPanes.layout
tocolumns-%d
the searchPanes are displayed in columns, with %d panes in each column.
Default
- Value:
'auto'
The default value for the searchPanes.layout
parameter is 'auto'
. This will allow SearchPanes to fit the panes optimally depending on the size of the display.
Example
Set the number of panes in a row to 2:
new DataTable('#myTable', {
layout: {
top1: 'searchPanes'
},
searchPanes: {
layout: 'columns-2'
}
});