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

Option displayed/selected in Select component disappears after State changes #40

Open ushafqat opened 7 years ago

ushafqat commented 7 years ago

I have two Select components and a DatePickerIOS. If the DatePickerIOS component changes state, the option selected in either of the Select component "disappears" i.e. reverts back to the placeholder. Is there a way around this?

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) } }