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.

defaultCountry: `Country not found: undefined`

See original GitHub issue


I’m implementing the component like this:

  onChange={(value: string) => setInputValue(value)}
  defaultCountry={chatbotLang === "fr" ? "FR" : undefined}

When I’m switching from “FR” to undefined it throws Country not found: undefined. This is probably a bug?

I’d like to switch to Internationnal. How can I achieve this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

catamphetaminecommented, Sep 22, 2020

Fixed in react-phone-number-input@3.0.26

kriyazhaocommented, Dec 7, 2020

@catamphetamine thank you for the quick fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default Country not working when using the min js file · Issue ...
Hello, me again. I found the auto selection of country was not working when using the min js file, works fine with the...
Read more >
How can i get default country store that i setup from admin ...
I have setup 5 country(United States,France,Italy,Spain,Germany) store in my shopify theme for storeswitcher ,My default country store is ...
Read more >
React Phone Number Input - GitHub Pages
No country. If no country or defaultCountry is specified then the phone number can only be input in international format.
Read more >
Phone field - SKY UX Documentation
Default country. By default, the country selector is set to the United States, but you can specify a different default value. You can...
Read more >
Using libphonenumber for International Phone Numbers
First, let's pass the full phone number including the country code. ... etc) and undefined if the number is invalid or not available...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found