Closed RemyMachado closed 4 years ago
Hello.
This component is meant to be used with onChange
— otherwise you wouldn't get the value
the user has input.
One could read it directly from DOMNode.value
but it wouldn't be the parsed value.
So onChange
is required in order for this component to work.
Yeah, you're right, I mixed up the purposes. Thanks for putting me back in the right track.
Hello,
I'm using the prop
numberInputComponent
that let me use a custom input component. In fact I'm handling changes on this custom input with a third party library (Formik). Therefore, I don't need theonChange
property, but only thevalue
one.Problem is, PhoneInput is crashing if I don't pass the
onChange
prop.Possible solution: Make it optional and check if exists before calling.
Thanks in advance.