cardView.columns
Set the columns to include in repeating templates.
Please note - this property requires the CardView extension for DataTables.
Description
CardView's built in templates will loop over the columns in the table and display the data from each column in the cards. There will be cases where you don't want to include all columns, and while you can use a custom template for this, you may also wish to keep the simplicity of the default templates. This option provides the ability to specify which columns should be included.
By default all columns will be included in the output, but you can use this option with any column selector (DataTable.ColumnSelector) to specify a subset of columns.
Type
DataTable.ColumnSelector
The columns that be used by the repeating templates. This accepts all of the options of DataTable.ColumnSelector such as CSS selectors and column index selectors.
Default
- Value:
*
Include all columns in the card view.
Example
Exclude the first column in the table from being included in the output template:
new DataTable('#myTable', {
cardView: {
columns: ':not(:first-child)'
}
});