react-phone-input-2 icon indicating copy to clipboard operation
react-phone-input-2 copied to clipboard

Incorrect Default Flag Display in Phone Input Component

Open dvdcpp opened this issue 1 year ago • 2 comments

Current Behavior: When using the stylesheet 'react-phone-input-2/lib/style.css', the component displays the first flag from the image set as the default when no country is selected. This is incorrect and can be misleading.

image

image

Expected Behavior: The component should display a neutral or generic icon when no country is selected.

Proposed Solution:

  1. Implement a generic icon (e.g., a globe) as the default display.
  2. Allow the option to select a custom default icon from a local image.

dvdcpp avatar Jul 18 '24 10:07 dvdcpp

Hi, I'm facing a similar issue. I'm using the component in an admin dashboard to set users' phone numbers.

When users don't have a phone number, the icon shown is from the Caribbean Netherlands. Is there a current solution to this? I would like the input to display as empty instead.

Screenshot 2024-10-04 at 17 11 57

Marius-Adam avatar Oct 04 '24 15:10 Marius-Adam

Hi @Marius-Adam how you separate the country flag from the phone input?

MedinaNtsprint avatar Feb 20 '25 20:02 MedinaNtsprint