import React from 'react'; import { FilterOptionsHandler, OnChangeHandler, OnOpenHandler, Option, OptionValues, Options, ReactSelectProps } from 'react-select'; import { Props } from '../../../common'; export interface ISelectInputProps { /** ID of the input */ id?: string; /** Input name */ name?: string; /** Input value */ value?: OptionValues | OptionValues[]; /** Placeholder label when no option is selected */ placeholder?: string | JSX.Element; /** Value when no option is selected */ emptyValue?: OptionValues | null; /** Text to display when no results found */ noResultsText?: string | JSX.Element; /** Array of options to display. */ options?: Options; /** Should an 'x' be shown which clears select inputs? */ isClearable?: boolean; /** If true, sets input to disabled state */ isDisabled?: boolean; /** Pending state for async loading options */ isFetching?: boolean; /** If true, adds invalid input class to component */ isInvalid?: boolean; /** If true, allows selecting multiple options */ isMultiSelect?: boolean; /** If true, allows typing on select inputbox */ isSearchable?: boolean; /** Should the input autoselect an option when there is only one provided? */ shouldAutoSelectWhenSingleOption?: boolean; /** Should close the menu when an item is selected? */ shouldCloseOnSelect?: boolean; /** Should filtering be performed within the component? Disable for async usage. */ shouldFilteringBePerformed?: boolean; /** For multiselects; should items be removed once selected? */ shouldRemoveElementsFromMultiSelect?: boolean; /** * DEPRECATED: component to render for options. * Should not be used - please create a separate component if you need this functionality. */ optionComponent?: ReactSelectProps['optionComponent']; /** Handler for selecting an option */ handleChange?: OnChangeHandler; /** Called when the input is changed */ onChange?: (value?: OptionValues | OptionValues[] | null) => void; /** Handler for opening the select menu */ onOpen?: OnOpenHandler; /** Handler for creating new options */ onNewOptionCreated?: (option: Option) => void; /** Handler for input being updated when user type to search */ onInputChange?: (input: string) => void; /** A function to customize the filtering logic */ filterOptions?: FilterOptionsHandler; /** Label for accessibility */ 'aria-label'?: string; /** The margins around the component */ margins?: Props.IMargins; /** The data-cy */ componentContext?: string; /** Specify the max with of multi select values. Defaults to 270. */ multiSelectValueMaxWidth?: number; } export declare const SelectInput: React.FC>;