Skip to content

Instantly share code, notes, and snippets.

@upamune
Created May 16, 2016 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save upamune/5ce591416c1ab453b11d44f51e8bd8be to your computer and use it in GitHub Desktop.
Save upamune/5ce591416c1ab453b11d44f51e8bd8be to your computer and use it in GitHub Desktop.
declare module 'react-typeahead' {
export import React = __React;
export interface TypeaheadProps extends React.Props<TypeaheadClass> {
options: any[];
defaultValue?: string;
value?: string;
maxVisible?: number;
customClasses?: any;
placeholder?: string;
disabled?: boolean;
textarea?: boolean;
inputProps?: any;
onKeyDown?: Function;
onKeyPress?: Function;
onKeyUp?: Function;
onBlur?: Function;
onFocus?: Function;
onOptionSelected?: Function;
filterOption?: (string|Function);
displayOption?: (string|Function);
formInputOption?: (string|Function);
defaultClassNames?: boolean;
customListComponent?: React.Component<any,any>;
showOptionsWhenEmpty?: boolean;
}
type TypeaheadClass = React.StatelessComponent<TypeaheadProps>
export const Typeahead: TypeaheadClass;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment