From fcf9cb2f1b7f56d0ce8665c0fb2dc1091325f629 Mon Sep 17 00:00:00 2001 From: Nate Jackman Date: Sat, 14 Nov 2015 23:04:21 -0700 Subject: [PATCH] Remove react warning with placeholder markup --- src/Select.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Select.js b/src/Select.js index d647fda3e5..10a2d2db95 100644 --- a/src/Select.js +++ b/src/Select.js @@ -59,7 +59,9 @@ const Select = React.createClass({ optionComponent: React.PropTypes.func, // option component to render in dropdown optionRenderer: React.PropTypes.func, // optionRenderer: function (option) {} options: React.PropTypes.array, // array of options - placeholder: React.PropTypes.string, // field placeholder, displayed when there's no value + placeholder: React.PropTypes.oneOfType([ // field placeholder, displayed when there's no value + React.PropTypes.string, + React.PropTypes.object]), 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