mirror of
https://github.com/danog/react-datalist-input.git
synced 2024-12-02 09:27:53 +01:00
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
declare module 'react-datalist-input' {
|
|
|
|
import * as React from 'react';
|
|
|
|
export interface DataListInputItem {
|
|
key: string | number;
|
|
label: string;
|
|
}
|
|
|
|
export interface DataListInputProperties {
|
|
items: DataListInputItem[];
|
|
onSelect: (selectedItem: DataListInputItem) => void;
|
|
match?: (currentInput: string, item: DataListInputItem) => boolean;
|
|
placeholder?: string;
|
|
itemClassName?: string;
|
|
activeItemClassName?: string;
|
|
inputClassName?: string;
|
|
dropdownClassName?: string;
|
|
requiredInputLength?: number;
|
|
clearInputOnSelect?: boolean;
|
|
suppressReselect?: boolean;
|
|
dropDownLength?: number;
|
|
initialValue?: string;
|
|
onDropdownOpen?: () => void;
|
|
onDropdownClose?: () => void;
|
|
debounceTime?: number;
|
|
debounceLoader?: React.ReactNode;
|
|
onInput?: (inputValue: string) => void;
|
|
}
|
|
|
|
export default class DataListInput extends React.Component<DataListInputProperties> {
|
|
|
|
}
|
|
}
|