Revert "fix: OTP auto-submit not firing when typing manually"
This reverts commit 6be28b4fb5df366ac5aec89121130f03c8d37401.
This commit is contained in:
parent
6be28b4fb5
commit
4665394bd4
@ -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]
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user