Guys, I have the similar issue using react-phone-number-input with Material-UI and Redux Form.
I took a look at https://github.com/catamphetamine/react-phone-number-input/issues/354 and tried to use this approach, but I spent several hours and didn't manage it to work.
The issue is that ref argument in InputPhone component is always an object with current field set to null. That's why I'm getting this error from react-phone-number-input when I'm trying to change the country by clicking select:
Moreover, the embedded parser which allows only numbers inside the input doesn't work.
Guys, I have the similar issue using
react-phone-number-input
withMaterial-UI
andRedux Form
. I took a look at https://github.com/catamphetamine/react-phone-number-input/issues/354 and tried to use this approach, but I spent several hours and didn't manage it to work. The issue is thatref
argument inInputPhone
component is always an object withcurrent
field set tonull
. That's why I'm getting this error fromreact-phone-number-input
when I'm trying to change the country by clickingselect
:Moreover, the embedded parser which allows only numbers inside the input doesn't work.
This is how I implemented.
In ReduxForm component:
InputPhone:
InputText:
Please help! Thanks in advance.