import { Placement, Strategy } from '@floating-ui/react'; import { IInputProps } from '../Input/types'; import { IPickerListItem } from '../Picker'; import * as React from 'react'; export type IAutoCompleteListItem = Omit & { customElement?: React.ReactElement; }; export interface AutoCompleteProps extends Omit { /** Options that will be displayed in the picker. If they are strings, they will be converted to `IPickerListItem[]`*/ options?: string[] | IAutoCompleteListItem[]; /** If true, disables filtering of the options. Useful for getting options from an external source.*/ alwaysShowAllOptions?: boolean; /** If true, the autocomplete list will be open when the component mounts.*/ autocompleteOpenOnInit?: boolean; /** Minimum height of the list */ minListHeight?: number; /** Maximum height of the list */ maxListHeight?: number; /** Placement of the list */ placement?: Placement; /** Floating strategy */ floatingStrategy?: Strategy; /** Type of the input. If true, only shows one matching item. */ single?: boolean; /** If true, the option list will be hidden if there is only one option and it is an exact match to the input value. */ hideIfExactMatch?: boolean; /** * Set the text to display with read-only state when there is no data. Default to 'No data' */ noDataFallbackText?: string; }