Skip to content

Commit

Permalink
fix: type incompatibility for phone number input value
Browse files Browse the repository at this point in the history
- Updated `react-phone-number-input` package from version `^3.3.12` to `^3.4.5`.
- Fixed type assignment issue in `onChange` handler to ensure compatibility with `E164Number` type.
  • Loading branch information
omeralpi committed Aug 19, 2024
1 parent 05e91a7 commit 5f678c9
Show file tree
Hide file tree
Showing 3 changed files with 4,503 additions and 3,672 deletions.
2 changes: 1 addition & 1 deletion components/ui/phone-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps> =
*
* @param {E164Number | undefined} value - The entered value
*/
onChange={(value) => onChange?.(value || "")}
onChange={(value) => onChange?.(value || ("" as RPNInput.Value))}
{...props}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.51.3",
"react-phone-number-input": "^3.3.12",
"react-phone-number-input": "^3.4.5",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
Expand Down
Loading

0 comments on commit 5f678c9

Please sign in to comment.