react-phone-input-2
react-phone-input-2 copied to clipboard
onChange is not triggered in redux-form
I wrapped this component into redux-form and passed onBlur, onFocus and onChange properties. First two are working but onChange doesn't trigger.
A workaround I found for getting the value is set a ref on ReactPhoneInput
<ReactPhoneInput
ref={(ref) => { this.phoneNumber = ref }}
...
then access the value using ref
this.phoneNumber.state.formattedNumber
Hope this issue gets fixed.