Skip to content

PhoneInput edge case when input text is cleared #3

@Lordfirespeed

Description

@Lordfirespeed

Related: #1

Source: DurHack project (ducompsoc/durhack) 'contact' application form

To reproduce

  1. Enter a valid phone number (e.g. +44 123456789)
  2. Clear text
  3. Start typing a new phone number with a different prefix (e.g. +61 ...)
  4. Clear text

Actual result

The selected phone number prefix reverts to the prefix of the last 'valid' input text (+44)

Expected result

The selected phone number prefix should revert to 'indeterminate'

Notes

Problem could be related to usage via react-hook-form - passing in the value prop?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions