Skip to content

Commit

Permalink
Исправление логики работы filter с использованием array
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander.L committed Dec 6, 2024
1 parent 0c78e3f commit 14f46b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Grid/Column/CheckFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ public function render()
$value = $this->getFilterValue([]);

$lists = collect($this->options)->map(function ($label, $key) use ($value) {
$checked = in_array($key, $value) ? 'checked' : '';
$checked = in_array($label, $value) ? 'checked' : '';

return <<<HTML
<li class="" style="margin: 0;">
<label style="width: 100%;padding: 3px;">
<input type="checkbox" class="{$this->class['item']}" name="{$this->getColumnName()}[]" value="{$key}" {$checked}/>&nbsp;&nbsp;&nbsp;{$label}
<input type="checkbox" class="{$this->class['item']}" name="{$this->getColumnName()}[]" value="{$label}" {$checked}/>&nbsp;&nbsp;&nbsp;{$label}
</label>
</li>
HTML;
Expand Down

0 comments on commit 14f46b7

Please sign in to comment.