Giter Site home page Giter Site logo

Comments (4)

necessarylion avatar necessarylion commented on June 19, 2024 1

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.

SpencerKaiser avatar SpencerKaiser commented on June 19, 2024 1

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.

necessarylion avatar necessarylion commented on June 19, 2024
 { 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.

SpencerKaiser avatar SpencerKaiser commented on June 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.