From 4cb4874e58bfeceecd525fa1db487db4e1a19551 Mon Sep 17 00:00:00 2001 From: ToshY <31921460+ToshY@users.noreply.github.com> Date: Mon, 13 May 2024 16:11:31 +0200 Subject: [PATCH] Add globalSearchable check for ArrayAdapter (#341) --- src/Adapter/ArrayAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Adapter/ArrayAdapter.php b/src/Adapter/ArrayAdapter.php index 376e754..3bd7347 100644 --- a/src/Adapter/ArrayAdapter.php +++ b/src/Adapter/ArrayAdapter.php @@ -103,7 +103,7 @@ protected function processRow(DataTableState $state, array $result, array $map, foreach ($state->getDataTable()->getColumns() as $column) { $value = (!empty($propertyPath = $map[$column->getName()]) && $this->accessor->isReadable($result, $propertyPath)) ? $this->accessor->getValue($result, $propertyPath) : null; $value = $column->transform($value, $result); - if (!$match) { + if (!$match && $column->isGlobalSearchable()) { $match = (false !== mb_stripos($value, $search)); } $row[$column->getName()] = $value;