mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-01 04:19:22 +08:00
[3.x] fix: add missing autofocus attribute to Radio and ToggleButtons (#19302)
* fix: add missing autofocus attribute to Radio and ToggleButtons * Apply suggestions from code review Signed-off-by: Dan Harrin <git@danharrin.com> --------- Signed-off-by: Dan Harrin <git@danharrin.com> Co-authored-by: Dan Harrin <git@danharrin.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
:attributes="
|
||||
\Filament\Support\prepare_inherited_attributes($getExtraInputAttributeBag())
|
||||
->merge([
|
||||
'autofocus' => $loop->first && $isAutofocused(),
|
||||
'disabled' => $isDisabled || $isOptionDisabled($value, $label),
|
||||
'id' => $id . '-' . $value,
|
||||
'name' => $id,
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
])
|
||||
>
|
||||
<input
|
||||
@if ($loop->first && $isAutofocused()) autofocus @endif
|
||||
@disabled($shouldOptionBeDisabled)
|
||||
id="{{ $inputId }}"
|
||||
@if (! $isMultiple)
|
||||
|
||||
Reference in New Issue
Block a user