UNPKG

1.05 kBTypeScriptView Raw
1import React from 'react';
2import { RenderProp, Value, WidgetHandle } from './types';
3import { TextAccessorFn, DataKeyAccessorFn } from './Accessors';
4export declare type RenderValueProp<TDataItem> = RenderProp<{
5 item: TDataItem;
6 dataKey: Value;
7 text: string;
8}>;
9export declare type DropdownInputHandle = WidgetHandle;
10interface Props<TDataItem> {
11 name?: string;
12 autoComplete?: 'on' | 'off';
13 value: TDataItem;
14 disabled?: boolean;
15 readOnly?: boolean;
16 allowSearch?: boolean;
17 placeholder?: string;
18 textAccessor: TextAccessorFn;
19 dataKeyAccessor: DataKeyAccessorFn;
20 searchTerm?: string;
21 onSearch?: React.ChangeEventHandler<HTMLInputElement>;
22 onAutofill(autofilling: boolean): void;
23 onAutofillChange(e: React.ChangeEvent<HTMLInputElement>): void;
24 renderValue?: RenderValueProp<TDataItem>;
25}
26declare const DropdownListInput: React.ForwardRefExoticComponent<Props<unknown> & React.RefAttributes<WidgetHandle>>;
27export default DropdownListInput;
28//# sourceMappingURL=DropdownListInput.d.ts.map
\No newline at end of file