Skip to content

Issue setting defaultCountry using dialCode #503

@axessandro

Description

@axessandro

Hi,
I'm encountering an issue when trying to configure defaultCountry using a dialCode.

Steps to Reproduce:

  • Set the dialCode prop with a numeric value (e.g., 1).
  • The component does not behave as expected.
  • Even when using the provided CodeSandbox from the documentation, the console error suggests that the input is always treated as a string.

Environment:

Library version: latest

Expected Behavior:

Setting dialCode as a number should correctly resolve the defaultCountry.

Actual Behavior:

The condition checking the type always assumes a string, leading to unexpected behavior.

Could you provide guidance on whether I’m misconfiguring something? If possible, a test case for CodeSandbox would be helpful.

Thanks in advance!

Metadata

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