Skip to content

Commit 1ba08f3

Browse files
authored
Merge pull request #117 from simonbuehler/disabled_input
fix disabled input
2 parents b1f061d + e43d7cb commit 1ba08f3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

resources/views/components/input.blade.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
</span>
1717
@endif
1818
<div class="relative w-full">
19-
@unless($field->disabled)
19+
2020
<input
2121
@if($field->required) required @endif
22+
@if($field->disabled) disabled @endif
2223
{{ $attributes->except([...array_keys($attr), 'x-data', 'required', 'disabled'])->merge($attr)->merge(['class' => $errors->has($field->key) ? $field->errorClass : $field->class ]) }}
2324
/>
24-
@else
25-
<input type="{{ $field->input_type ?? 'text' }}" disabled value="{{ data_get($this, $field->key) }}" />
26-
@endunless
2725
@error($field->key)
2826
<x-tall-error-icon :right="in_array($field->type, ['date', 'datetime-local', 'time']) ? 'right-6' : 'right-0'"/>
2927
@enderror

0 commit comments

Comments
 (0)