import { InputSelectProps, PossibleSelectValue } from './InputSelect'; export interface HookedInputSelectProps extends Omit { /** * field name to match hook-form state */ name: string; /** * Specify the path (in the `SelectValue` object) to reach the value to store in field. * @default * "value" * * Example: * ``` * // single mode * {value: 'ff0000', label: 'Red'} // set field value as 'ff0000' * * // multi mode * [{value: 'ff0000', label: 'Red'}, {value: 'ffff00', label: 'Yellow'}] * // set field value as ['ff0000', 'ffff00'] * ``` */ pathToValue?: string; /** * Optional callback executed when a value is selected to allow custom behavior and re-use the selected value. * This does not effect the field value neither the form state that always contains the value defined by `pathToValue`. * It's useful when you need to perform some action when a value is selected and accessing the `meta` key of the `InputSelectValue` */ onSelect?: (value: PossibleSelectValue) => void; } /** * `InputSelect` component ready to be used with the `react-hook-form` context. * Value to be stored in the field can be controlled from the `pathToValue` prop. * @see InputSelect */ export declare const HookedInputSelect: React.FC;