### File

`packages/components/eui-table-v2/sortable-col/eui-table-v2-sortable-col.component.ts`

### Description

Component used internally by `eui-table-v2` to make a column sortable.

### Implements

`OnInit` `OnDestroy`

### Metadata

selector | `th[isSortable]`
imports | `TranslateModule` `EUI_ICON` `EUI_BUTTON`
templateUrl | `./eui-table-v2-sortable-col.component.html`

### Index

###### Properties

- euiDropdown
- Public isSorted
- Public order
- Public sortedIndex

###### Methods

- Public changeSort
- Public onDropdownItemClick

###### Inputs

- defaultOrder
- isMultiSortable
- sortDisabled
- sortOn
- sortOrder

###### HostBindings

- class

###### Accessors

- cssClasses

### Inputs

defaultOrder
Type : `boolean`
Default value : `false`
Whether the column is sorted by default.

isMultiSortable
Type : `boolean`
Default value : `false`
Whether the sorting of the column can be cumulated with the one of other column.

sortDisabled
Type : `boolean`
Default value : `false`
Whether the sort is disabled on the column.

sortOn
Type : `string`

sortOrder
Type : `SortOrder`
Default value : `'asc'`

### HostBindings

class
Type : `string`

### Methods

Public changeSort
`changeSort()`
Handles the click event on the sortable column. Returns : `void`

Public onDropdownItemClick
`onDropdownItemClick(order: SortOrder)`

Handles the click event on the dropdown item when the column is multi-sortable.

Parameters :

Name | Type | Optional | Description
order | `SortOrder` | No | An array of SortOrder. See SortOrder

Returns : `void`

### Properties

euiDropdown
Type : `EuiDropdownComponent`
Decorators : `@ViewChild('euiDropdown')`

Public isSorted
Default value : `false`

Public order
Type : `SortOrder`
Default value : `'none'`

Public sortedIndex
Type : `number`
Default value : `null`

### Accessors

cssClasses
get `cssClasses()`
Computes and returns the CSS classes for the component based on its current state. Returns : `string`

# results matching ""

# No results matching ""