A really cool project, love it. does exactly what I need.
Might find a defect, my test case: first init with empty value/options, then pass in valid value/options, after re-render, default value would not show properly.
Potential fix as following marked part, should use options from newly passed in props check if new value is valid.
A really cool project, love it. does exactly what I need.
Might find a defect, my test case: first init with empty value/options, then pass in valid value/options, after re-render, default value would not show properly.
Potential fix as following marked part, should use options from newly passed in props check if new value is valid.
Ning.
componentWillReceiveProps(nextProps) { const nextState = {}; const { defaultOptions, value } = this.state;
const option = this.findByValue(nextState.defaultOptions, nextProps.value);