UNPKG

downshift

Version:

🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.

12 lines (11 loc) 618 B
/** * Returns the next non-disabled highlightedIndex value. * * @param start The current highlightedIndex. * @param backwards If true, it will search backwards from the start. * @param items The items array. * @param isItemDisabled Function that tells if an item is disabled or not. * @param circular If the search reaches the end, if it can search again starting from the other end. * @returns The next non-disabled index. */ export declare function getNonDisabledIndex<Item>(start: number, backwards: boolean, items: Item[], isItemDisabled: (item: Item, index: number) => boolean, circular?: boolean): any;