omeralpi / shadcn-phone-input

Customizable phone input component with proper validation for any country. Built on top of shadcn.
https://shadcn-phone-input.vercel.app
MIT License
422 stars 28 forks source link

fix: onChange prop in PhoneInput component #4

Closed omeralpi closed 6 months ago

omeralpi commented 6 months ago

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.

vercel[bot] commented 6 months ago

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