-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: match area codes or priority when determining country code
* Suggesting this basic solution to check the area codes when determining the country code. Why: When the phone number control value is set programatically, eg. when a record is read and the control is populated with the phone number so that it can be edited, the area codes were NOT taken into consideration when attempting to determine the country code. For example, when I programmatically set the value of the control with a US phone number, eg. +19781234567 the country returned was American Samoa (+1 684). * Suggesting a check of the country 'priority'. Why: To ensure that the highest priority country is associated with any country code that is utilized by multiple countries, eg. +39 is shared by Italy and Vatican City. I'm not sure how to can figure out which country was used when the phone number was created. The phone numbers, eg. +39 312 345 6789 do NOT contain any 'priority' info. * Suggesting adding the country name is displayed on hover. Why: The country name could be useful to user unfamiliar with the selected flag and the hover tooltip is the quickest and easiest way to provide that information. These changes would go a long way to help me adopt using the component I my project. While I have tinkered with the code, and offered some basic solutions, please don't hestitate to make different, better changes (perhaps make the tooltip configurable) yourself that might support the needs described above. I added an input field to the test application for testing that programmatically setting the component value returns the correct country code based on country and area code. Please let me know if you have any questions or concerns.
- Loading branch information
Glen Hollingworth
committed
Aug 14, 2024
1 parent
2ce2072
commit 1e0e003
Showing
5 changed files
with
49 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters