facebook/react — pull request #2241 by syranide (2014-09-25 10:08:32+00:00)
Title: Fix select component, inconsistent state value when toggling controlled/multiple

Broken behavior discovered/encountered by #1510

Previously, state would only be updated on user interaction or when toggling `multiple`. This meant that any forced `value` update was not remembered when toggling `multiple` or becoming uncontrolled.

To solve this it has to read value during `componentWillReceiveProps`, which `LinkedValueUtils` couldn't do. So I updated `LinkedValueUtils` to take a `props`-object instead, which seems consistent with the direction of a reactjs-future proposal as well.

It also simplifies/optimizes non-`multiple` selects, where rather than traversing every `option` it just updates `select.value` directly.

Test plan: just `grunt test` for now