diff --git a/packages/components/input-otp/src/use-input-otp.ts b/packages/components/input-otp/src/use-input-otp.ts index 842125cf0e..2604ba6a63 100644 --- a/packages/components/input-otp/src/use-input-otp.ts +++ b/packages/components/input-otp/src/use-input-otp.ts @@ -230,7 +230,7 @@ export function useInputOtp(originalProps: UseInputOtpProps) { ref: inputRef, name: name, value: value, - autoFocus: originalProps.autoFocus, + autoFocus, onChange: setValue, onBlur: chain(focusProps.onBlur, props?.onBlur), onComplete: onComplete, @@ -255,6 +255,7 @@ export function useInputOtp(originalProps: UseInputOtpProps) { setValue, props.onBlur, onComplete, + autoFocus, ], );