-
Notifications
You must be signed in to change notification settings - Fork 17
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
input phone / react: country code not recognized #2275
Comments
This is a consequence of violating https://github.com/axa-ch-webhub-cloud/pattern-library/tree/develop/src/components/20-molecules/input-phone#value requirements, i.e. no space between country code and local phone number. As such this is not a bug, since the behaviour is deliberate and documented. Also see #2277 (comment) for deeper explanation. |
OK, I could reproduce it. Likely fix will be for the defaultValue case. |
@MarekLacoAXA I intend to fix this bug by processing defaultValue once after the initial render, handling composite numbers there as well. Note that the UI encourages a separate selection of country-code and phone number, that's almost the whole point of why we have that component in the first place. Composite numbers were added for user-pasting of existing numbers, e.g. from other web documents, they are not the main focus of this component, merely a convenience feature. So, initializing it from a composite number is an oddity, but I am willing to make an exception here. |
Hi @markus-walther ! When datepicker is in place, then the dropdown shows "S..." (see my screenshots). |
I think that processing "each time" when "defaultValue" changes, would be better (more natural) then processing only "once".
I would like to let users edit existing numbers using this component. Existing numbers means: numbers were entered PRIOR using this component: so there is no assurance that a space separator is in place between country prefix and national number.
Thanks!!! |
EXPECTED: country code prefix (+41 Deutschland) of value (maybe defaultValue too?) gets recognized and displayed in dropdown.
ACTUAL: dropdown stays Schweiz in all cases; Textfied contains +49 prefix on most cases, see screenshot.
Code: (spaces / no spaces):
Screen:
The text was updated successfully, but these errors were encountered: