{hero}

orderDesc

Since: ColumnControl 1.0.0

Set the table to order by this column, descending.
Please note - this property requires the ColumnControl extension for DataTables.

Description

This content type will show a button which simply sets the table to order by the data in this column, descending, when triggered.

Display

The button added by this control will display as a simple icon button at the top level, or as a button with icon and text in a dropdown. It is generally expected that it will be used in a dropdown to avoid cluttering the UI.

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):

icon

  • Type: string
  • Default: orderDesc

Button icon. Can take the name of any icon available in DataTable.ColumnControl.icons (which is a writeable object containing SVG icons).

text

  • Type: string
  • Default: Sort Descending

Trigger button text (shown when in a dropdown). Can also be set by the orderDesc key of language.columnControl, which will take priority if set.

Example

Show ordering icon and buttons to trigger ascending and descending ordering directly in a dropdown.:

new DataTable('#example', {
    columnControl: [
		'order',
		[
			'orderAsc',
			'orderDesc'
		]
	],
    ordering: {
        indicators: false,
        handler: false
    }
});