From 5cdf561e41aaeb167832fcdccb1cd1eceb644d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20de=20Marqu=C3=A9=20Fromentin?= Date: Thu, 31 May 2018 22:25:58 +0200 Subject: [PATCH 1/2] Bug in filter select --- Datatable/Filter/SelectFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Datatable/Filter/SelectFilter.php b/Datatable/Filter/SelectFilter.php index fd2c73f5..d3cec039 100644 --- a/Datatable/Filter/SelectFilter.php +++ b/Datatable/Filter/SelectFilter.php @@ -70,7 +70,7 @@ public function addAndExpression(Andx $andExpr, QueryBuilder $qb, $searchField, foreach ($searchValues as $searchItem) { $this->setSelectSearchType($searchItem); - $orExpr->add($this->getExpression($qb->expr()->andX(), $qb, $this->searchType, $searchField, $searchValue, $searchTypeOfField, $parameterCounter)); + $orExpr->add($this->getExpression($qb->expr()->andX(), $qb, $this->searchType, $searchField, $searchItem, $searchTypeOfField, $parameterCounter)); } return $andExpr->add($orExpr); From 64b52aeb0e6b495f7c1664a7f26ef223b0edfd64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20ALFAIATE?= Date: Mon, 11 Jun 2018 15:59:50 +0200 Subject: [PATCH 2/2] Rename vars --- Datatable/Filter/SelectFilter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Datatable/Filter/SelectFilter.php b/Datatable/Filter/SelectFilter.php index d3cec039..2e878a07 100644 --- a/Datatable/Filter/SelectFilter.php +++ b/Datatable/Filter/SelectFilter.php @@ -68,9 +68,9 @@ public function addAndExpression(Andx $andExpr, QueryBuilder $qb, $searchField, if (true === $this->multiple && is_array($searchValues) && count($searchValues) > 1) { $orExpr = $qb->expr()->orX(); - foreach ($searchValues as $searchItem) { - $this->setSelectSearchType($searchItem); - $orExpr->add($this->getExpression($qb->expr()->andX(), $qb, $this->searchType, $searchField, $searchItem, $searchTypeOfField, $parameterCounter)); + foreach ($searchValues as $searchValue) { + $this->setSelectSearchType($searchValue); + $orExpr->add($this->getExpression($qb->expr()->andX(), $qb, $this->searchType, $searchField, $searchValue, $searchTypeOfField, $parameterCounter)); } return $andExpr->add($orExpr);