chore: Add autocomplete attribute to input fields
This commit is contained in:
@@ -22,6 +22,7 @@ class Input extends Component
|
||||
public bool $allowToPeak = true,
|
||||
public bool $isMultiline = false,
|
||||
public string $defaultClass = 'input',
|
||||
public string $autocomplete = 'off',
|
||||
) {}
|
||||
|
||||
public function render(): View|Closure|string
|
||||
|
@@ -25,7 +25,8 @@
|
||||
</svg>
|
||||
</div>
|
||||
@endif
|
||||
<input value="{{ $value }}" {{ $attributes->merge(['class' => $defaultClass]) }} @required($required)
|
||||
<input autocomplete="{{ $autocomplete }}" value="{{ $value }}"
|
||||
{{ $attributes->merge(['class' => $defaultClass]) }} @required($required)
|
||||
@if ($id !== 'null') wire:model={{ $id }} @endif
|
||||
wire:dirty.class.remove='dark:focus:ring-coolgray-300 dark:ring-coolgray-300'
|
||||
wire:dirty.class="dark:focus:ring-warning dark:ring-warning" wire:loading.attr="disabled"
|
||||
@@ -35,7 +36,7 @@
|
||||
|
||||
</div>
|
||||
@else
|
||||
<input @if ($value) value="{{ $value }}" @endif
|
||||
<input autocomplete="{{ $autocomplete }}" @if ($value) value="{{ $value }}" @endif
|
||||
{{ $attributes->merge(['class' => $defaultClass]) }} @required($required) @readonly($readonly)
|
||||
@if ($id !== 'null') wire:model={{ $id }} @endif
|
||||
wire:dirty.class.remove='dark:focus:ring-coolgray-300 dark:ring-coolgray-300'
|
||||
|
Reference in New Issue
Block a user