Revert "fix: OTP auto-submit not firing when typing manually"

This reverts commit 6be28b4fb5df366ac5aec89121130f03c8d37401.
This commit is contained in:
ramirez 2026-03-05 18:34:49 +09:00
parent 6be28b4fb5
commit 4665394bd4

View File

@ -65,7 +65,7 @@ function useOtpHandlers({
const newValue = newDigits.join("");
onChange(newValue);
if (char && index < length - 1) focusInput(index + 1);
if (newValue.length === length) onComplete?.(newValue);
if (newValue.length === length && !newValue.includes("")) onComplete?.(newValue);
},
[digits, length, onChange, onComplete, focusInput]
);