-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not delete the ")" #12
Comments
I fixed it with this but idk if its the best way to do it of if im doing something wrong 28 case 'processInput':
27 const inputTextHandler = new AsYouType(
26 state.countryCode as CountryCode
25 );
24 let input = payload;
23 if (state.formattedText.length == 5 && payload.length == 4) input = (state.formattedText as string).substring(0, 3);
22
21 const formattedText = inputTextHandler.input(input);
20
19 // handles auto-complete input
18 if (inputTextHandler.isInternational()) {
17 const countryCode = inputTextHandler.getCountry() as string;
16 const countryTel = inputTextHandler.getCallingCode();
15 return {
14 ...state,
13 countryTel,
12 countryCode,
11 formattedText:
10 inputTextHandler.getNumber()?.formatNational() || '',
9 number: inputTextHandler.getNumberValue() as string,
8 };
7 }
6
5 return {
4 ...state,
3 inputText: input,
2 formattedText: formattedText,
1 number: inputTextHandler.getNumberValue() as string,
0 }; |
i made a new input variable that replaces payload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I enter an area code and its formatted like this "(500)", I cannot delete the ")"
The text was updated successfully, but these errors were encountered: