fix: numeric keyboard in mobile for otp forms
This commit is contained in:
@@ -214,13 +214,9 @@ export function EmailSection(props: EmailSectionProps) {
|
|||||||
<TextField
|
<TextField
|
||||||
label={t('completion.verificationCode')}
|
label={t('completion.verificationCode')}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
type="text"
|
type="tel"
|
||||||
value={verificationCode}
|
value={verificationCode}
|
||||||
onChange={handleVerificationCodeChange}
|
onChange={handleVerificationCodeChange}
|
||||||
sx={{
|
|
||||||
flex: '1 1 260px',
|
|
||||||
'& .MuiOutlinedInput-root': { height: INPUT_H },
|
|
||||||
}}
|
|
||||||
disabled={isVerifyingCode}
|
disabled={isVerifyingCode}
|
||||||
onBlur={() => handleBlur('verificationCode')}
|
onBlur={() => handleBlur('verificationCode')}
|
||||||
error={touched.verificationCode && !!errors.verificationCode}
|
error={touched.verificationCode && !!errors.verificationCode}
|
||||||
@@ -229,6 +225,13 @@ export function EmailSection(props: EmailSectionProps) {
|
|||||||
inputMode: 'numeric',
|
inputMode: 'numeric',
|
||||||
pattern: '[0-9]*',
|
pattern: '[0-9]*',
|
||||||
maxLength: 4,
|
maxLength: 4,
|
||||||
|
autoComplete: 'one-time-code',
|
||||||
|
name: 'one-time-code',
|
||||||
|
dir: 'ltr',
|
||||||
|
}}
|
||||||
|
sx={{
|
||||||
|
flex: '1 1 260px',
|
||||||
|
'& .MuiOutlinedInput-root': { height: 56 },
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export async function saveProfile(payload: {
|
|||||||
|
|
||||||
export async function sendVerificationCode(payload: { phoneNumber: string }) {
|
export async function sendVerificationCode(payload: { phoneNumber: string }) {
|
||||||
return apiClient.post<PhoneNumberApiResponse>(
|
return apiClient.post<PhoneNumberApiResponse>(
|
||||||
'/Profile/SendVerfiyPhoneNumberCode',
|
'/Profile/SendChangePhoneNumberCode',
|
||||||
payload,
|
payload,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user