UNPKG

reablocks

Version:
21 lines (20 loc) 762 B
import { SelectOptionProps } from '../SelectOption'; export interface GroupOptions { /** The list of computed groups for the provided options. */ groups: GroupOption[]; /** The total number of items across all groups. */ itemsCount: number; /** Whether the options resulted in any groups being created. */ hasGroups: boolean; } export interface GroupOption { /** The starting index of the group within the flattened option list. */ offset: number; /** The position index of this group. */ index: number; /** The option items belonging to this group. */ items: SelectOptionProps[]; /** The name of the group. */ name: string; } export declare function getGroups(options: SelectOptionProps[]): GroupOptions;