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.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

toggleSelect
required
(item: IDataTableSelectableItem) => void
Toggles the selection state of a single item.
select
required
(items: Array<IDataTableSelectableItem>, value: boolean) => void
Sets the selection state of an array of items to value.
selectAll
required
(value: boolean) => void
Selects or deselects all selectable items on the current page (or all items, depending on selectStrategy).
isSelected
required
(items: IDataTableSelectableItem | Array<IDataTableSelectableItem>) => boolean
Returns true when every passed item is currently selected.
isSomeSelected
required
(items: IDataTableSelectableItem | Array<IDataTableSelectableItem>) => boolean
Returns true when at least one of the passed items is selected.
someSelected
required
ComputedRef<boolean>
Reactive flag — true when at least one row is selected (drives the indeterminate state of the header checkbox).
allSelected
required
ComputedRef<boolean>
Reactive flag — true when all selectable rows are selected.
showSelectAll
required
ComputedRef<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

typescript