question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Country flag disappears when loading number not in list

See original GitHub issue

Hi, thanks for the great package!

I have an issue when loading a phone number which belongs to a country not listed in the countries prop.

Expected result: When specifying which countries to display in the select dropdown, loading a phone number from a country not in the list should display the ‘International’ flag.

Actual result: Loading a phone number from a country not in the select list still changes the country, and makes the flag disappear.

How I use the package:

 <PhoneInput
            value={props.value}
            country="SE"
            onChange={props.onChange}
            countries={["SE", "FI", "FR", "ES"]}
            displayInitialValueAsLocalNumber={true}
        />

If the value is set to, for example, a Russian phone number when the component loads, no flag will show up.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
daniolscommented, Dec 18, 2018

Awesome, thanks for the amazing work! Much appreciated.

0reactions
catamphetaminecommented, Nov 23, 2021

@emcorder Perhaps you’re using version < 3.x Otherwise, could be something else in your setup or in your app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - In the search box display the country flag only ...
Requirement 3: The flag of the country should be displayed on the right side of the search box. Currently, I have completed auto-population...
Read more >
Taiwan Flag Emoji Disappears for iPhone Users in Hong ...
Hong Kong and Macau users reported the the Taiwan flag emoji has disappeared for iPhone users in iOS 13.1.1 or above.
Read more >
Technical difficulties submitting my ESTA application
If the system will not accept your passport number, try entering it in without any spaces between the numbers.
Read more >
The Texanist: Why Have the Six Flags Disappeared?
An Amarillo man is unhappy that the iconic banners no longer fly in front of the Texas Travel Information Centers.
Read more >
Navigation disappeared! | MachEforum - Mach-E Forum
Country flag. Aug 22, 2022. #3. Did you select your profile icon and see what is in the list of applications/links there?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found