Skip to content

Vizel API / core/src / getNextVizelSlashMenuGroupIndex

Function: getNextVizelSlashMenuGroupIndex()

ts
function getNextVizelSlashMenuGroupIndex(spec, currentIndex): number;

Defined in: packages/core/src/builders/slash-menu.ts:25

Compute the next-group jump target for Tab-key navigation.

Given the current spec and the global currentIndex, return the global index of the first item in the next section (wrapping around). When the spec has zero or one section, the current index is returned unchanged.

Parameters

ParameterType
specVizelMenuSpec<VizelCommandSpec>
currentIndexnumber

Returns

number

Released under the MIT License.