Skip to content

Commit

Permalink
fix Select filter resets after apply others
Browse files Browse the repository at this point in the history
  • Loading branch information
ShamazinGG committed Apr 11, 2024
1 parent b6adddc commit d3c201d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions resources/views/fields/select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@
>
<select {{ $attributes }}>
@foreach($options as $key => $option)
<option value="{{$key}}"
@isset($value)
@if (is_array($value) && in_array($key, $value)) selected
@elseif (isset($value[$key]) && $value[$key] == $option) selected
@elseif ($key == $value) selected
@endif
@endisset
>{{$option}}</option>
<option value="{{ $key }}"
@if(isset($value) && ((is_array($value) && in_array($key, $value)) || $key == $value))
selected
@endif
>{{ $option }}</option>
@endforeach
</select>
</div>
Expand Down

0 comments on commit d3c201d

Please sign in to comment.