Skip to content

Commit 9549285

Browse files
authored
Fix #7806: InputOtp add autoFocus (#7879)
1 parent 117e038 commit 9549285

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

components/lib/inputotp/InputOtp.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export const InputOtp = React.memo(
228228
invalid: props?.invalid,
229229
tabIndex: props?.tabIndex,
230230
unstyled: props?.unstyled,
231+
autoFocus: props?.autoFocus && inputElementIndex === 0,
231232
'aria-label': ariaLabel('otpLabel', { 0: inputElementIndex + 1 }),
232233
className: cx('input'),
233234
pt: ptm('input')

0 commit comments

Comments
 (0)