react-phone-input-2 icon indicating copy to clipboard operation
react-phone-input-2 copied to clipboard

onChange is not triggered in redux-form

Open RakhmatovR opened this issue 8 years ago • 1 comments

I wrapped this component into redux-form and passed onBlur, onFocus and onChange properties. First two are working but onChange doesn't trigger.

RakhmatovR avatar Apr 18 '18 05:04 RakhmatovR

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.

douglaswissett avatar Apr 24 '18 14:04 douglaswissett