cardView.orthogonal

Since: CardView 1.0.0

Set the orthogonal data fetch type.
Please note - this property requires the CardView extension for DataTables.

Description

DataTables has powerful orthogonal data options, which allows you to specify different values for a single value. For example, when sorting a telephone number, it is useful to do so as a whole number, but for display you use a formatted value. When searching for the phone number, you can allow both formats to be used.

CardView continues this ability, and lets you control what data is requested from the data renderer for each data point to be displayed. The default is to use display, which matches the data DataTables will display in the table cells, but this gives you the option of tweaking the value for a card specific display.

Type

string

Sets the data type that is requested from the data source when drawing data into a template.

Default

  • Value: display

Matches the same as DataTables main display method, to ensure that the data displayed is the same.

Example

Set a custom orthogonal value for CardView sourcing data:

new DataTable('#myTable', {
	cardView: {
		orthogonal: 'cardview'
	}
});