Skip to content

Commit

Permalink
Merge pull request #21 from booellean/9.0.x
Browse files Browse the repository at this point in the history
Select Option is "selected" based on value or default value
  • Loading branch information
nickwest authored Oct 19, 2022
2 parents 13b72e1 + 218f248 commit d35e52b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/fields/select_option.blade.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<option value="{{ $key }}"{{ ($Field->attributes->value == $key || $Field->default_value == $key ? ' selected' : '') }}{{ (is_array($Field->attributes->value) && in_array($key, $Field->attributes->value) ? ' selected' : '') }}>{{ $value }}</option>
<option value="{{ $key }}"{{ ($Field->attributes->value == $key || ($Field->default_value == $key && !$Field->attributes->value)? ' selected' : '') }}{{ (is_array($Field->attributes->value) && in_array($key, $Field->attributes->value) ? ' selected' : '') }}>{{ $value }}</option>

0 comments on commit d35e52b

Please sign in to comment.