Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhoneInput edge case when input text is cleared #3

Open
Lordfirespeed opened this issue Sep 29, 2024 · 0 comments
Open

PhoneInput edge case when input text is cleared #3

Lordfirespeed opened this issue Sep 29, 2024 · 0 comments

Comments

@Lordfirespeed
Copy link
Member

Lordfirespeed commented Sep 29, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant