cardView.mode
Since: CardView 1.0.0
Set the CardView start up mode.
Please note - this property requires the CardView extension for DataTables.
Description
This option is used to set CardView's mode of operation when the DataTable starts up. It can be one of the following options:
cards- Cards are displayedtable- Table is displayedauto- Either the cards or table will be displayed based on the content width available and the responsive configuration of CardView.
Type
string
This value must be one of auto, cards or table.
Default
- Value:
auto
Whether the cards or table will be displayed is dependent on the content width.
Example
Display the card view on initialisation:
new DataTable('#myTable', {
cardView: {
mode: 'cards'
}
});