Comments (4)
Honestly I think I would prefer the flexibility of knowing what's an area code vs what's a country code, so something like this would be my preferred option, but the second is definitely better IMO; first is simpler to use but has way too much data overlap
{ name: 'Jamaica', dial_code: '+1', area_codes: ['876', '658'], code: 'JM', flag: 'π―π²' },
It is very nice suggestion.
But This plugin is more about dial code
which is country code
+ area code
together.
In your case, it is country code
and area codes
.
And if someone want to show list on available dial codes, then he have loop again with area codes.
So I think we better stick with this solution.
{ name: 'Jamaica', dial_code: '+1876', code: 'JM', flag: 'π―π²' },
{ name: 'Jamaica', dial_code: '+1658', code: 'JM', flag: 'π―π²' },
from country-list-with-dial-code-and-flag.
I think that's totallyΒ fine, but it'd still be a great addition to have the country code split out as a separate element. If I don't want Jamaica
showing twice, I have no real options because I don't know how to split the country code from the area code. At some point in the future, adding country_code
in addition to dial_code
would be great, even if the country code is redundant on the dial code field.
from country-list-with-dial-code-and-flag.
{ name: 'Jamaica', dial_code: '+1876', code: 'JM', flag: 'π―π²' },
{ name: 'Jamaica', dial_code: '+1658', code: 'JM', flag: 'π―π²' },
or
{ name: 'Jamaica', dial_code: '+1876', dial_codes: ['+1876', '+1658'], code: 'JM', flag: 'π―π²' },
Which one do you think is better?
from country-list-with-dial-code-and-flag.
Honestly I think I would prefer the flexibility of knowing what's an area code vs what's a country code, so something like this would be my preferred option, but the second is definitely better IMO; first is simpler to use but has way too much data overlap
{ name: 'Jamaica', dial_code: '+1', area_codes: ['876', '658'], code: 'JM', flag: 'π―π²' },
from country-list-with-dial-code-and-flag.
Related Issues (11)
- Add country name with local language
- How to render flag value π³π΅ in html ? HOT 1
- Icon Missing HOT 1
- Support React Native Import HOT 1
- Missing countries HOT 1
- How to use the emoji for loading the flag icons? HOT 1
- Random flags HOT 4
- How to load the images? HOT 1
- Emoji displaying HOT 9
- Wrong and missing dial codes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from country-list-with-dial-code-and-flag.