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

fix: onChange prop in PhoneInput component #4

Merged
merged 1 commit into from
Feb 20, 2024
Merged

fix: onChange prop in PhoneInput component #4

merged 1 commit into from
Feb 20, 2024

Conversation

omeralpi
Copy link
Owner

@omeralpi omeralpi commented Feb 20, 2024

I resolved the issue by updating the default value of the react-phone-number-input package from undefined to null. This aligns with the recommendation from react-hook-form, which suggests using null or an empty string as the default/cleared value instead of undefined. This change ensures compatibility and consistency across the codebase.

Fixes #3.

Copy link

vercel bot commented Feb 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shadcn-phone-input ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2024 5:09pm

@omeralpi omeralpi merged commit 832f070 into main Feb 20, 2024
3 checks passed
@omeralpi omeralpi deleted the fix/patch-2 branch February 23, 2024 15:51
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

Successfully merging this pull request may close these issues.

Issue when using with default value in react-hook-form
1 participant