From 74ce2d22e797706025dc7c5e21a3b37d14f09ca9 Mon Sep 17 00:00:00 2001 From: Mike Deverell Date: Mon, 6 Feb 2017 22:51:24 -0500 Subject: [PATCH 1/2] add `optionClassName` to `ReactSelectProps` --- react-select/index.d.ts | 4 ++++ react-select/react-select-tests.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/react-select/index.d.ts b/react-select/index.d.ts index a7c0f2f17a..c3474fdb85 100644 --- a/react-select/index.d.ts +++ b/react-select/index.d.ts @@ -272,6 +272,10 @@ declare namespace ReactSelectClass { * @default false */ openOnFocus?: boolean; + /** + * className to add to each option component + */ + optionClassName?: string; /** * option component to render in dropdown */ diff --git a/react-select/react-select-tests.tsx b/react-select/react-select-tests.tsx index d2704878d9..7840f2ce9e 100644 --- a/react-select/react-select-tests.tsx +++ b/react-select/react-select-tests.tsx @@ -99,6 +99,7 @@ class SelectTest extends React.Component, {}> { className: "test-select", key: "1", options: options, + optionClassName: 'test-select-option', optionRenderer: optionRenderer, autofocus: true, autosize: true, From 906ece8d53c7b1fb9159e6be2aef0dea538bd062 Mon Sep 17 00:00:00 2001 From: Mike Deverell Date: Mon, 6 Feb 2017 22:51:39 -0500 Subject: [PATCH 2/2] add name to contributors list --- react-select/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-select/index.d.ts b/react-select/index.d.ts index c3474fdb85..b149fd4c47 100644 --- a/react-select/index.d.ts +++ b/react-select/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for react-select v1.0.0 // Project: https://github.com/JedWatson/react-select -// Definitions by: ESQUIBET Hugo , Gilad Gray , Izaak Baker , Tadas Dailyda , Mark Vujevits +// Definitions by: ESQUIBET Hugo , Gilad Gray , Izaak Baker , Tadas Dailyda , Mark Vujevits , Mike Deverell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1