mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Partial merge remote-tracking branch 'upstream/master' into merge_7_25
This commit is contained in:
@@ -2,15 +2,16 @@ import * as React from "react";
|
||||
import * as ReactDOM from "react-dom";
|
||||
|
||||
import Select, * as ReactSelect from "react-select";
|
||||
import { Option } from "react-select";
|
||||
|
||||
class SelectTest extends React.Component<React.Props<{}>, {}> {
|
||||
|
||||
render() {
|
||||
const options: ReactSelect.Option[] = [{ label: "Foo", value: "bar" }];
|
||||
const options: Option[] = [{ label: "Foo", value: "bar" }];
|
||||
const onChange = (value: any) => console.log(value);
|
||||
const onOpen = () => { return; };
|
||||
const onClose = () => { return; };
|
||||
const optionRenderer = (option: ReactSelect.Option) => <span>{option.label}</span>
|
||||
const optionRenderer = (option: Option) => <span>{option.label}</span>
|
||||
return <div>
|
||||
<Select
|
||||
name="test-select"
|
||||
@@ -42,7 +43,7 @@ class SelectAsyncTest extends React.Component<React.Props<{}>, {}> {
|
||||
callback(null, options);
|
||||
}, 500);
|
||||
};
|
||||
const options: ReactSelect.Option[] = [{ label: "Foo", value: "bar" }];
|
||||
const options: Option[] = [{ label: "Foo", value: "bar" }];
|
||||
const onChange = (value: any) => console.log(value);
|
||||
return <div>
|
||||
<Select.Async
|
||||
|
||||
Reference in New Issue
Block a user