@tabula/ui-multi-selector
Version:
A MultiSelector allows users to select one or more items from a list of choices, or suggest own item.
21 lines (20 loc) • 698 B
TypeScript
import { CSSProperties, Ref, RefObject } from 'react';
import { FloatingContext } from '@floating-ui/react';
import { DropdownController } from '../../types';
type Result = {
isOpen: boolean;
context: FloatingContext;
dropdownRef: RefObject<DropdownController>;
floatingRef: Ref<HTMLDivElement>;
referenceRef: Ref<HTMLDivElement>;
getFloatingProps: () => Record<string, unknown>;
getReferenceProps: () => Record<string, unknown>;
style: CSSProperties;
onShowDropdown: () => void;
onHideDropdown: () => void;
onGoNext: () => void;
onGoPrevious: () => void;
onSelectCurrent: () => void;
};
export declare function useDropdown(): Result;
export {};