UNPKG

@aveonline/ui-react

Version:

Home base for Aveonline design system - ecosystem react

21 lines (20 loc) 839 B
import type { ISelect, IOption } from '../Select'; export interface IAsyncCreatableSelect extends Omit<ISelect, 'options'> { /** * Handle change search async */ loadOptions?: (inputValue: string) => Promise<IOption[]> | undefined | void; /** * Will cause the select to be displayed in the loading state, even if the * Async select is not currently waiting for loadOptions to resolve */ isLoading?: boolean; /** * Allow options to be created while the `isLoading` prop is true. Useful to * prevent the "create new ..." option being displayed while async results are * still being loaded. */ allowCreateWhileLoading?: boolean; /** Sets the position of the createOption element in your options list. Defaults to 'last' */ createOptionPosition?: 'first' | 'last'; }