Skip to content

Commit 60e76f7

Browse files
committed
fix: copy-paste otp code
1 parent 53fb9a3 commit 60e76f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/hooks/use-text-input-otp.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export function TextInputOTPProvider({
5050

5151
if (text.length === maxLength) {
5252
onFilled?.(text);
53+
setCurrentIndex(text.length - 1);
54+
return;
5355
}
5456

5557
if (text.length < maxLength) {

0 commit comments

Comments
 (0)