IDataTableSelectStrategy

interface
Component Props

Strategy object that controls how rows are selected in a DataTable — defines whether a select-all checkbox is shown and implements the select / selectAll / allSelected algorithms.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

showSelectAll
requis
boolean
Whether a select-all checkbox should be rendered in the header row.
allSelected
requis
(data: { allItems: Array<IDataTableSelectableItem> currentPage: Array<IDataTableSelectableItem> }) => Array<IDataTableSelectableItem>
Returns the subset of items that are considered fully selected under this strategy.
select
requis
(data: { items: Array<IDataTableSelectableItem> value: boolean selected: Set<unknown> }) => Set<unknown>
Applies a selection toggle on a given set of items and returns the new selected set.
selectAll
requis
(data: { value: boolean allItems: Array<IDataTableSelectableItem> currentPage: Array<IDataTableSelectableItem> selected: Set<unknown> }) => Set<unknown>
Applies a select-all or deselect-all operation and returns the resulting selected set.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Custom page-only select strategy

typescript