Skip to content

usePhoneInput, onChange #56

Answered by goveo
organroman asked this question in Q&A
Jun 11, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hey @organroman! Seems like you are passing empty (or not formatted) value and onChange is triggered on initial formatting.
Make sure you are passing already formatted value, for example:

usePhoneInput({
  defaultCountry: 'us',
  value: '+1 ',
  onChange: (data) => {},
});

Can you provide some live code examples if that doesn't help in your case? 🙏

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@organroman
Comment options

@goveo
Comment options

@organroman
Comment options

@goveo
Comment options

Answer selected by organroman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants