Skip to content

Commit bd26d44

Browse files
authored
Filtering - support FilterText conditions with OR
1 parent 0cc4b18 commit bd26d44

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/QueryObjectDataSource.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,12 @@ public function filter(array $filters): void
139139
call_user_func($filter->getConditionCallback(), $this->queryObject, $filter->getValue());
140140
}
141141
elseif ($filter instanceof FilterText) {
142-
foreach ($filter->getCondition() as $by => $value) {
143-
$this->queryObject->by(
144-
$by,
145-
$value,
146-
false
147-
);
148-
}
142+
$by = array_keys($filter->getCondition());
143+
$value = $filter->getCondition()[$by[0]];
144+
$this->queryObject->by(
145+
$by,
146+
$value,
147+
false);
149148
}
150149
elseif (!$filter instanceof FilterDateRange) {
151150
$this->queryObject->by(

0 commit comments

Comments
 (0)