Skip to content

Commit 5e6bcdc

Browse files
committed
add autofocus attribute to the first element if autofocus is true
1 parent 0e6237e commit 5e6bcdc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

resources/views/components/otp-input.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
>
107107
<input
108108
{{$isDisabled ? 'disabled' : ''}}
109+
{{$loop->first && $isAutofocused ? 'autofocus' : ''}}
109110
type="{{$inputType}}"
110111
maxlength="1"
111112
x-ref="{{$column}}"

0 commit comments

Comments
 (0)