Skip to main content

IUseDataTableSelectionOptions

Admin Docs


Interface: IUseDataTableSelectionOptions<T>

Defined in: src/types/shared-components/DataTable/hooks.ts:190

Configuration options for row selection in a DataTable.

Controls how rows can be selected, which rows are selectable, and provides callbacks for selection changes and bulk actions.

Type Parameters​

T​

T

The type of row data in the table

Properties​

bulkActions?​

optional bulkActions: readonly IBulkAction<T>[]

Defined in: src/types/shared-components/DataTable/hooks.ts:207

Array of bulk actions available for selected rows


initialSelectedKeys?​

optional initialSelectedKeys: ReadonlySet<Key>

Defined in: src/types/shared-components/DataTable/hooks.ts:205

Initial set of selected rows on component mount


keysOnPage​

keysOnPage: Key[]

Defined in: src/types/shared-components/DataTable/hooks.ts:194

Array of keys for rows on the current page


onSelectionChange()?​

optional onSelectionChange: (next) => void

Defined in: src/types/shared-components/DataTable/hooks.ts:203

Callback fired when the selection changes. Receives a new immutable set of selected keys.

Parameters​

next​

ReadonlySet<Key>

Returns​

void


paginatedData​

paginatedData: readonly T[]

Defined in: src/types/shared-components/DataTable/hooks.ts:192

Array of rows currently shown on the page


selectable?​

optional selectable: boolean

Defined in: src/types/shared-components/DataTable/hooks.ts:196

Whether row selection is enabled for this table


selectedKeys?​

optional selectedKeys: ReadonlySet<Key>

Defined in: src/types/shared-components/DataTable/hooks.ts:198

Set of currently selected row keys