JedWatson/react-select — pull request #10 by quile (2014-09-30 23:41:25+00:00)
Title: Check isMounted() before setting state within a timeout

Hey, thanks for this great project. I've been using it and recently found a problem with the handleBlur() handler. Because it sets a timeout, it's entirely possible that the component will not be mounted when the timeout occurs. Because of this, the component needs to check isMounted() before trying to setState() or it'll puke.

Also, I noticed that in chrome at least, and perhaps other browsers, the value of the hidden field is set to the string "[Object object]" rather than the actual value of the selected item. I was able to fix this with this change:

-	value: value,
+	value: selectedOption.value,

in getStateFromValue.