Skip to content

Commit

Permalink
Same filter logic for all data sources #139
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Apr 11, 2021
1 parent 43aa070 commit a6417f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Controller/DatasourceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ private function filterData($data, $filter)
|| ($filterOption === 'LIKE' && strpos($record[$key], $filterValue) !== FALSE)
) {
array_push($filtered, $record);
} else if ($filterOption === 'IN') {
$filterValues = explode(',', $filterValue);
if (in_array($record[$key], $filterValues)) {
array_push($filtered, $record);
}
}
}
$data = $filtered;
Expand Down

0 comments on commit a6417f1

Please sign in to comment.