Skip to content

Commit

Permalink
Using SelectBox filter value directly, cast value before explode.
Browse files Browse the repository at this point in the history
  • Loading branch information
kuchy authored and paveljanda committed Feb 21, 2020
1 parent 8955714 commit c6b1d66
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DataSource/ArrayDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ protected function applyFilter($row, Filter $filter)
foreach ($condition as $column => $value) {
$value = (string) $value;
$rowVal = (string) $row[$column];
if ($filter instanceof FilterText && $filter->isExactSearch()) {
if (($filter instanceof FilterText && $filter->isExactSearch())
|| $filter instanceof SelectBox) {
return $rowVal === $value;
}

$words = $filter instanceof FilterText && $filter->hasSplitWordsSearch() === false ? [$value] : explode(' ', $value);
$words = $filter instanceof FilterText && $filter->hasSplitWordsSearch() === false ? [$value] : explode(' ', (string) $value);

$row_value = strtolower(Strings::toAscii((string) $row[$column]));

Expand Down

0 comments on commit c6b1d66

Please sign in to comment.