diff --git a/comps/form/field/type/TypeOTP.tsx b/comps/form/field/type/TypeOTP.tsx index d295124..f7f35a0 100755 --- a/comps/form/field/type/TypeOTP.tsx +++ b/comps/form/field/type/TypeOTP.tsx @@ -25,7 +25,6 @@ export const FieldOTP: FC<{
{local.otp.map((item, idx) => ( {}} + inputMode="decimal" + pattern="[0-9]*" value={item} ref={(ref) => { if (ref) local.ref[idx] = ref; @@ -79,8 +79,10 @@ export const FieldOTP: FC<{ const otp = local.otp.join(""); fm.data[field.name] = otp; - fm.render(); - local.render(); + if (otp.length === digit) { + fm.render(); + } + // local.render(); }} /> ))}