Closed jharsono closed 6 years ago
This library only contains pure javascript functions. It doesn't contain any input functionality.
Thank you - I will double check with my input field implementation.
Btw, recently I released a "without country select, just phone input" component. https://github.com/catamphetamine/react-phone-number-input/#without-country-select Seems to be no issues.
I found my issue: When I was passing numbers into the AsYouType, I was passing the entire value of the field, so when you backspace on the parenthesis, the formatter still evaluates the 3 numbers and puts the parenthesis back in. I just added a conditional to only start formatting after 3 numbers have been typed. Specifically for when using US phone number format.
I see )
When I have US phone number in an input field, I can't backspace over a parenthesis. Clicking inside the parenthesis allows me to backspace one number, then jumps the cursor back to the space after the parenthesis.