getItemIndex
Commons
stable
Finds the array index of the group item whose ID matches the resolved ID of the given value. Returns -1 when no match is found.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- itemsrequisUnwrapRef<Array<IGroupItem>>
- The reactive list of registered group items (id + value pairs).
- valuerequisunknown
- The value to look up. Internally passed to getIds() which performs deep equality matching and index-fallback resolution.
API
Valeur de retour
La valeur retournée par cet util.
- The zero-based index of the matching item in the items array, or -1 when not found.
Usage
Exemples
Extraits de code prêts à coller.
Find the position of a selected value