### File

`packages/components/eui-table/services/eui-table-selectable-row.service.ts`

### Description

Service to manage the selection state of rows in a table. Allows tracking of selected rows and managing selection for individual and multiple rows.

### Index

###### Properties
Public isAllRowsSelected$ Public selectedRows$
###### Methods
Public getLastSelectedRow Public getPropId Public getRows Public registerRow Public registerRows Public selectAllRows Public selectRow Public selectRows Public selectSingleRow Public setPropId Public unregisterRow Public unregisterRows Public unselectAllRows Public unselectRow
###### Accessors
selectedRows isAllRowsSelected

### Methods

Public getLastSelectedRow
`getLastSelectedRow()`
Gets the last selected row. Returns : `DATA` The last selected row.

Public getPropId
`getPropId()`
Gets the current property name used to identify rows. Returns : `string`

Public getRows
`getRows()`
Gets the list of registered rows. Returns : `DATA[]` The list of registered rows.

Public registerRow
`registerRow(row: DATA)`
Registers a row as selectable. Parameters :
Name | Type | Optional | Description
row | `DATA` | No | Row to register.
Returns : `void`

Public registerRows
`registerRows(rows: DATA[])`
Registers a set of rows as selectable. Parameters :
Name | Type | Optional | Description
rows | `DATA[]` | No | Set of rows to register.
Returns : `void`

Public selectAllRows
`selectAllRows()`
Select all rows. Returns : `void`

Public selectRow
`selectRow(row: DATA)`
Selects a row. Parameters :
Name | Type | Optional | Description
row | `DATA` | No | Row to select.
Returns : `void`

Public selectRows
`selectRows(rows: DATA[])`
Selects a set of rows. Parameters :
Name | Type | Optional | Description
rows | `DATA[]` | No | Rows to select.
Returns : `void`

Public selectSingleRow
`selectSingleRow(row: DATA)`
Selects a single row and replace existing one in selectedRows array. Parameters :
Name | Type | Optional | Description
row | `DATA` | No | Row to select.
Returns : `void`

Public setPropId
`setPropId(value: string)`
Sets the property name used to identify rows as unique. Parameters :
Name | Type | Optional
value | `string` | No
Returns : `void`

Public unregisterRow
`unregisterRow(row: DATA)`
Unregisters a row as selectable. Parameters :
Name | Type | Optional | Description
row | `DATA` | No | Row to unregister.
Returns : `void`

Public unregisterRows
`unregisterRows()`
Unregisters all rows. Returns : `void`

Public unselectAllRows
`unselectAllRows()`
Unselect all rows. Returns : `void`

Public unselectRow
`unselectRow(row: DATA)`
Unselects a row. Parameters :
Name | Type | Optional | Description
row | `DATA` | No | Row to unselect.
Returns : `void`

### Properties

Public isAllRowsSelected$
Type : `BehaviorSubject<boolean>`
Default value : `new BehaviorSubject(false)`
BehaviorSubject containing the state of whether all rows are selected.

Public selectedRows$
Type : `BehaviorSubject<DATA[]>`
Default value : `new BehaviorSubject([])`
BehaviorSubject containing the selected rows.

### Accessors

selectedRows
get `selectedRows()`
Observable stream of selected rows. Returns : `Observable<DATA[]>`

isAllRowsSelected
get `isAllRowsSelected()`
Observable stream of whether all rows are selected. Returns : `Observable<boolean>`

# results matching ""

# No results matching ""