Browse Source

Add fallback for phone number input

Make sure every change event returns a string.
master
TheoryOfNekomata 1 year ago
parent
commit
4dd56bb336
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      categories/formatted/react/src/components/PhoneNumberInput/index.tsx

+ 1
- 0
categories/formatted/react/src/components/PhoneNumberInput/index.tsx View File

@@ -91,6 +91,7 @@ export const PhoneNumberInput = React.forwardRef<
} = useProxyInput<PhoneNumberInputDerivedElement, Value>({ } = useProxyInput<PhoneNumberInputDerivedElement, Value>({
forwardedRef, forwardedRef,
valueSetterFn: (v) => setPhoneNumber(v), valueSetterFn: (v) => setPhoneNumber(v),
transformChangeHandlerArgs: (v) => (v ?? '') as unknown as Value,
}); });


const commonInputStyles = clsx( const commonInputStyles = clsx(


Loading…
Cancel
Save