Skip to content

Commit

Permalink
Merge pull request #117 from simonbuehler/disabled_input
Browse files Browse the repository at this point in the history
fix disabled input
  • Loading branch information
tanthammar authored Mar 28, 2022
2 parents b1f061d + e43d7cb commit 1ba08f3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions resources/views/components/input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
</span>
@endif
<div class="relative w-full">
@unless($field->disabled)

<input
@if($field->required) required @endif
@if($field->disabled) disabled @endif
{{ $attributes->except([...array_keys($attr), 'x-data', 'required', 'disabled'])->merge($attr)->merge(['class' => $errors->has($field->key) ? $field->errorClass : $field->class ]) }}
/>
@else
<input type="{{ $field->input_type ?? 'text' }}" disabled value="{{ data_get($this, $field->key) }}" />
@endunless
@error($field->key)
<x-tall-error-icon :right="in_array($field->type, ['date', 'datetime-local', 'time']) ? 'right-6' : 'right-0'"/>
@enderror
Expand Down

0 comments on commit 1ba08f3

Please sign in to comment.