### File

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

### Description

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

### Implements

`OnInit` `OnDestroy`

### Metadata

selector | `th[sortable]`
imports | `NgTemplateOutlet` `FormsModule` `ReactiveFormsModule` `TranslateModule` `EUI_ICON` `EUI_BUTTON` `EUI_BADGE` `EUI_FEEDBACK_MESSAGE` `EUI_SELECT` `EUI_LABEL` `EUI_DROPDOWN`
templateUrl | `./eui-table-sortable-col.component.html`

### Index

###### Properties

- currentMultiSortPosition
- dropdown
- error
- form
- multisortParams
- Public order

###### Methods

- Public click
- getOrderByIndex
- onCancelMultiSort
- onClickMultisortOrder
- onOpenDropdown
- onSubmitMultiSort

###### Inputs

- defaultMultiOrder
- defaultOrder
- isMultiSortable
- sortDisabled
- sortOn
- sortOrder

###### HostBindings

- class

###### Accessors

- cssClasses
- columns

### Inputs

defaultMultiOrder
Type : `any`
Default value : `null`
Whether the column is multi-sorted by default.

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 : `"asc" | "desc"`
Default value : `'desc'`

### HostBindings

class
Type : `string`

### Methods

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

getOrderByIndex
`getOrderByIndex(index: number)`

Parameters :

Name | Type | Optional
index | `number` | No

Returns : `string | null`

onCancelMultiSort
`onCancelMultiSort()`
Returns : `void`

onClickMultisortOrder
`onClickMultisortOrder(index: number, order: "asc" | "desc" | null)`

Handles the click event on the multi-sortable column.

Parameters :

Name | Type | Optional
index | `number` | No
order | `"asc" | "desc" | null` | No

Returns : `void`

onOpenDropdown
`onOpenDropdown()`
Returns : `void`

onSubmitMultiSort
`onSubmitMultiSort()`
Returns : `void`

### Properties

currentMultiSortPosition
Type : `number`
Default value : `0`

dropdown
Type : `EuiDropdownComponent`
Decorators : `@ViewChild(EuiDropdownComponent)`

error
Default value : `false`

form
Type : `FormGroup`

multisortParams
Type : `MultisortParam[]`
Default value : `[]`

Public order
Type : `"asc" | "desc" | null`
Default value : `'desc'`

### Accessors

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

columns
get `columns()`

# results matching ""

# No results matching ""