esbenp / react-native-clean-form

Easy react-native forms using bootstrap-like syntax with redux-form+immutablejs integration. Styled using styled-components
http://esbenp.github.io/2017/01/06/react-native-redux-form-immutable-styled-components/
MIT License
478 stars 83 forks source link

onValueChange on select component won't change #57

Closed yoesak closed 6 years ago

yoesak commented 6 years ago

If I override onValueChange on Select component, and inside the override method I do setState, the display value on select component won't change.

yoesak commented 6 years ago

I found the solution, by removing the method call onValueChange inside the componentWillReceiveProp

componentWillReceiveProps(nextProps) { if (nextProps.value !== this.state.value) { //this.onValueChange(nextProps.value) } }