UNPKG

@wix/design-system

Version:

@wix/design-system

23 lines (20 loc) 844 B
import * as React from 'react'; import InputWithOptions, { ManualInputFnSignature, OnSelectFnSignature, InputWithOptionsProps, } from '../InputWithOptions'; import { DropdownLayoutValueOption } from '../DropdownLayout'; export interface AutoCompleteProps extends InputWithOptionsProps { /** Defines a callback predicate for the filtering options function. */ predicate?: (option: DropdownLayoutValueOption) => boolean; /** Defines a message to be displayed instead of options when no options exist or no options pass the predicate filter function. */ emptyStateMessage?: React.ReactNode; /** Defines a callback function which is called when no options exist.*/ onEmptyState?: () => void; } export default class AutoComplete extends InputWithOptions< ManualInputFnSignature, OnSelectFnSignature, AutoCompleteProps > {}