mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
Fix definition for optionRenderer in react-select (#8957)
This commit is contained in:
committed by
Masahiro Wakame
parent
bc9b3d9c80
commit
2543e90c09
@@ -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}
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user