From ac811011bae841e93425a07e470535a2c0a18d1e Mon Sep 17 00:00:00 2001 From: andrei gec Date: Fri, 20 May 2016 10:09:58 +1000 Subject: [PATCH] style prop warning - can be either object or array --- src/Select.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Select.js b/src/Select.js index 4f4f3a1cfa..491c5c17b9 100644 --- a/src/Select.js +++ b/src/Select.js @@ -22,6 +22,11 @@ const stringOrNode = React.PropTypes.oneOfType([ React.PropTypes.node ]); +var objectOrArray = React.PropTypes.oneOfType([ + React.PropTypes.object, + React.PropTypes.array +]); + const Select = React.createClass({ displayName: 'Select', @@ -80,7 +85,7 @@ const Select = React.createClass({ scrollMenuIntoView: React.PropTypes.bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged searchable: React.PropTypes.bool, // whether to enable searching feature or not simpleValue: React.PropTypes.bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false - style: React.PropTypes.object, // optional style to apply to the control + style: objectOrArray, // optional style to apply to the control tabIndex: React.PropTypes.string, // optional tab index of the control tabSelectsValue: React.PropTypes.bool, // whether to treat tabbing out while focused to be value selection value: React.PropTypes.any, // initial field value