Skip to content

Figure out country code automatically? #67

Open
@jnazander

Description

Hi,

This component seems to be only good for registration forms (i.e. when the phone number doesn't exist yet), because the selected country always has to be supplied manually.

But what if I want to use this component to edit an already existing phone number? Why do I still need to specify the selected country manually? Can you make it so that the country is automatically parsed from the phone number's country code?

For example, if I provide +37255530593 as the value, it should automatically set Estonia as the country code. Right now it always sets Afghanistan, (unless another country is manually provided)

With the way it is now, I first need to use some other library to parse the country from the phone number, and then supply that country to ReactPhoneInput, which is a lot of redundant work.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions