UNPKG

mithril-materialized

Version:
15 lines (14 loc) 694 B
import { FactoryComponent } from 'mithril'; import { InputAttrs } from './input-options'; export interface AutoCompleteAttrs extends InputAttrs<string> { /** The data object defining the autocomplete options */ data?: Record<string, string | null>; /** Limit of how many options are shown. Default: Infinity */ limit?: number; /** Minimum length of input before autocomplete shows. Default: 1 */ minLength?: number; /** Function called when an option is selected */ onAutocomplete?: (value: string) => void; } /** Component to auto complete your text input - Pure Mithril implementation */ export declare const Autocomplete: FactoryComponent<AutoCompleteAttrs>;