IDataTableProvideSelection
interface
Component Props
Internal provide/inject contract for row-selection state in <OrigamDataTable> — exposes selection helpers and computed flags consumed by checkboxes, header select-all and slot children.
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.
- toggleSelectrequired(item: IDataTableSelectableItem) => void
- Toggles the selection state of a single item.
- selectrequired(items: Array<IDataTableSelectableItem>, value: boolean) => void
- Sets the selection state of an array of items to value.
- selectAllrequired(value: boolean) => void
- Selects or deselects all selectable items on the current page (or all items, depending on selectStrategy).
- isSelectedrequired(items: IDataTableSelectableItem | Array<IDataTableSelectableItem>) => boolean
- Returns true when every passed item is currently selected.
- isSomeSelectedrequired(items: IDataTableSelectableItem | Array<IDataTableSelectableItem>) => boolean
- Returns true when at least one of the passed items is selected.
- someSelectedrequiredComputedRef<boolean>
- Reactive flag — true when at least one row is selected (drives the indeterminate state of the header checkbox).
- allSelectedrequiredComputedRef<boolean>
- Reactive flag — true when all selectable rows are selected.
- showSelectAllrequiredComputedRef<boolean>
- Reactive flag — controls whether the select-all checkbox is rendered in the header.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Injecting selection helpers in a child component