Skip to content

Commit 32b7acf

Browse files
authored
Update taggable.blade.php
1 parent 32fa139 commit 32b7acf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/views/impl/taggable.blade.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ class="form-control taggable {{ ($errors->has($field['name'])) ? ' is-invalid' :
1111
<?php $pre_selected = optional($config['initial'])[$field['name']]; ?>
1212
@foreach($config['multiselect_values'][$field['name']] ?? $config['multiselect_values'] as $key => $label)
1313
<option
14-
{{ in_array($label, old($field['name'], $pre_selected) ) ? 'selected' : '' }}
15-
16-
{{-- {{ (old($field['name'], $pre_selected) == $label ? 'selected' : '') }} --}}
14+
{{ old($field['name'], $pre_selected) ? in_array($label, old($field['name'], $pre_selected) ) ? 'selected' : '' : '' }}
1715
value="{{ $label }}">{{ $label }}</option>
1816
@endforeach
1917
@endif
@@ -33,4 +31,4 @@ class="form-control taggable {{ ($errors->has($field['name'])) ? ' is-invalid' :
3331
</div>
3432
@endforeach
3533
@endif
36-
</div>
34+
</div>

0 commit comments

Comments
 (0)