autoView

Since: CardView 1.0.0

.
Please note - this property requires the CardView extension for DataTables.

Description

This button will set CardView into its "auto" mode. In this mode, whether the cards or table will be displayed depends upon the content width of the container and the responsive configuration for CardView (cardView.responsiveBreakpoint). On smaller screens the cards will be shown, while on wider screens, the table will be displayed.

Note that when the operating mode of CardView is auto, this button will be shown as active.

Options

This button can have the following options set in its configuration object to customise its actions and display, in addition to those options which are available for all buttons (e.g. buttons.buttons.text):

text

  • Type: string
  • Default: Auto view

The button's display text. The text can be configured using this option (see buttons.buttons.text) or use the buttons.autoView option of the DataTables language object.

Example

View specific buttons:

new DataTable('#myTable', {
	cardView: true,
	layout: {
		topStart: {
			buttons: ['cardView', 'tableView', 'autoView']
		}
	}
});