getValues

Commons
stable

Extracts the value (or index fallback) of each IGroupItem whose id appears in the provided ids array. Used internally by group-selection composables to translate selection identifiers back to model values.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

items
requis
UnwrapRef<Array<IGroupItem>>
The flat list of group items to search. Each item must expose an id and an optional value field.
ids
requis
Array<any>
The selection identifiers to look up. Order is preserved in the output.

API

Valeur de retour

La valeur retournée par cet util.

An array of resolved values (item.value when set, otherwise the item index). Items whose id is not found in the list are silently skipped.

Usage

Exemples

Extraits de code prêts à coller.

Resolve ids to values

typescript