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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- showSelectAllrequiredboolean
- Whether a select-all checkbox should be rendered in the header row.
- allSelectedrequired(data: { allItems: Array<IDataTableSelectableItem> currentPage: Array<IDataTableSelectableItem> }) => Array<IDataTableSelectableItem>
- Returns the subset of items that are considered fully selected under this strategy.
- selectrequired(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.
- selectAllrequired(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.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Custom page-only select strategy