Fix definition for optionRenderer in react-select (#8957)

This commit is contained in:
Roger Chen
2016-04-17 23:48:38 +09:00
committed by Masahiro Wakame
parent bc9b3d9c80
commit 2543e90c09
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -14,12 +14,14 @@ class SelectTest extends React.Component<React.Props<{}>, {}> {
const onChange = (value: any) => console.log(value);
const onOpen = () => { return; };
const onClose = () => { return; };
const optionRenderer = (option: ReactSelect.Option) => <span>{option.label}</span>
return <div>
<Select
name="test-select"
className="test-select"
key="1"
options={options}
optionRenderer={optionRenderer}
matchPos={"any"}
matchProp={"any"}
multi={true}
+1 -1
View File
@@ -163,7 +163,7 @@ declare namespace ReactSelect {
/**
* function which returns a custom way to render the options in the menu
*/
optionRenderer?: () => void;
optionRenderer?: (option: Option) => JSX.Element;
/**
* array of Select options
* @default false