Skip to content

Commit

Permalink
Merge pull request #87 from avstudnitz/patch-1
Browse files Browse the repository at this point in the history
Fix boolean filter behavior
  • Loading branch information
Vinai authored Feb 6, 2025
2 parents 10b9965 + a8225a5 commit 32ac2d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions view/adminhtml/templates/grid/filter/bool.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ $value = $filter->getValue();
?>
<select name="<?= $escaper->escapeHtmlAttr($filter->getInputName()) ?>"
form="<?= $filter->getFormId() ?>"
class="form-select w-full">
class="form-select w-full"
@change="formGridUpdate($event.target.form)"
>
<option value=""> </option>
<option value="1"<?= isset($value) && $value ? ' selected' : '' ?>><?= __('Yes') ?></option>
<option value="0"<?= isset($value) && !$value ? ' selected' : '' ?>><?= __('No') ?></option>
<option value="0"<?= isset($value) && !$value && $value !== '' ? ' selected' : '' ?>><?= __('No') ?></option>
</select>

0 comments on commit 32ac2d1

Please sign in to comment.