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
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- itemsrequiredUnwrapRef<Array<IGroupItem>>
- The reactive list of registered group items (id + value pairs).
- valuerequiredunknown
- The value to look up. Internally passed to getIds() which performs deep equality matching and index-fallback resolution.
API
Return value
The value returned by this util.
- The zero-based index of the matching item in the items array, or -1 when not found.
Usage
Examples
Ready-to-paste usage snippets.
Find the position of a selected value