IDataTableProvideGroup

interface
Component Props

Internal provide/inject contract for row-grouping state in <OrigamDataTable> — exposes the groupBy axis, the open/closed set of group nodes and helpers to toggle, extract and query groups.

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.

sortByWithGroups
requis
ComputedRef<Array<IDataTableSortItem>>
Computed sort array that prepends the groupBy columns so groups are contiguous before any user-defined sort keys.
toggleGroup
requis
(group: IDataTableGroup) => void
Toggles the open/closed state of a group node.
opened
requis
Ref<Set<string> & Omit<Set<string>, keyof Set<any>>>
Reactive set of group IDs that are currently open (expanded).
groupBy
requis
Ref<Array<IDataTableSortItem>>
Reactive array of column keys used as the grouping axis.
extractRows
requis
(items: Array<IDataTableGroupableItem | IDataTableGroup<IDataTableGroupableItem>>) => Array<IDataTableGroupableItem>
Flattens a mixed array of items and group nodes into a plain array of leaf items.
isGroupOpen
requis
(group: IDataTableGroup) => boolean
Returns true when the given group is currently expanded.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Grouping rows by a column

vue