Skip to content

Commit 42f3c42

Browse files
authored
Merge pull request #8 from makoso/hotfix/7
refs #7 - Poprawić filtrowanie z value = 0 #7
2 parents 2627b59 + cd57aea commit 42f3c42

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Grid/Grid.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ private function processFilter()
276276
if ($column->isFilterable() && $column->getFilterGroup() != null) {
277277
$filterData = $this->formData[self::GRID_FORM_FILTERABLE_KEY][$column->getName()];
278278

279-
if ($filterData['filterType'] instanceof FilterInterface && (!empty($filterData['value']) || !empty($filterData['value2']))) {
279+
$hasFirstValue = !empty($filterData['value']) || $filterData['value'] === 0;
280+
$hasSecondValue = !empty($filterData['value2']) || $filterData['value2'] === 0;
281+
if ($filterData['filterType'] instanceof FilterInterface && ($hasFirstValue || $hasSecondValue)) {
280282
$column->setFilterableValue(
281283
[
282284
'value' => $filterData['value'],

0 commit comments

Comments
 (0)