From 39d97a1817b0cebad032e23a5f7ebce556e825f7 Mon Sep 17 00:00:00 2001 From: Vicky Lai Date: Thu, 28 Jul 2016 17:21:42 -0700 Subject: [PATCH] Fix value type for react-select --- react-select/react-select-tests.tsx | 19 +++++++++++++++++++ react-select/react-select.d.ts | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/react-select/react-select-tests.tsx b/react-select/react-select-tests.tsx index 7b8027123d..de45b52d32 100644 --- a/react-select/react-select-tests.tsx +++ b/react-select/react-select-tests.tsx @@ -141,6 +141,25 @@ class SelectTest extends React.Component, {}> { } } +class SelectWithStringValueTest extends React.Component, {}> { + + render() { + const options: Option[] = [{ label: "Foo", value: "bar" }]; + const onChange = (value: any) => console.log(value); + + const selectProps: ReactSelectProps = { + name: "test-select-with-string-value", + value: "bar", + options: options, + onChange: onChange + }; + + return
+