]> _ Git - cubist_cms-back.git/commitdiff
wait #5756
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Feb 2023 16:54:22 +0000 (17:54 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Feb 2023 16:54:22 +0000 (17:54 +0100)
src/app/Magic/Controllers/CubistMagicController.php

index 8f8b87d35208c665afb6f6d088329e702af53519..f8b117ab99a16f6f48948cc1049de5f227742223 100644 (file)
@@ -96,7 +96,9 @@ class CubistMagicController extends CubistCrudController
         |--------------------------------------------------------------------------
         */
         if ($model->showPrimaryColumn()) {
-            $this->crud->addColumn(['name' => $model->getPrimaryKey(), 'type' => $model->getPrimaryColumnType(), 'label' => "#", 'thousands_sep' => '', 'searchLogic' => 'text']);
+            $this->crud->addColumn(['name' => $model->getPrimaryKey(), 'type' => $model->getPrimaryColumnType(), 'label' => "#", 'thousands_sep' => '', 'searchLogic' => function ($query, $column, $searchTerm) use ($model) {
+                $query->orWhere($column['name'], '=', $searchTerm);
+            }]);
         }
 
         $this->updateFieldsFromModel($model);