### File

`packages/components/eui-table-v2/services/eui-table-v2-sort.service.ts`

### Description

Service to manage the sorting state of columns in a table. Uses a `BehaviorSubject` to store and emit the current sorting values.

### Index

###### Properties

- Public sorts$

###### Methods

- setSort
- setSorts

###### Accessors

- sorts

### Methods

setSort
`setSort(sort: string, order: SortOrder, isMultiSortable: boolean)`

Sets the ordering order for a given column

Parameters :

Name | Type | Optional | Description
sort | `string` | No | The name of the column to sort.
order | `SortOrder` | No | The sorting order (ascending, descending, none).
isMultiSortable | `boolean` | No | Whether multi-sorting is allowed.

Returns : `void`

setSorts
`setSorts(sorts: Sort[])`

Sets the full list of sorting values.

Parameters :

Name | Type | Optional | Description
sorts | `Sort[]` | No | The list of sorts to apply.

Returns : `void`

### Properties

Public sorts$
Default value : `new BehaviorSubject<Sort[]>([])`
BehaviorSubject containing the current sorting information.

### Accessors

sorts
get `sorts()`
Observable stream of sorting values. Returns : `Observable<Sort[]>`

# results matching ""

# No results matching ""