Procházet zdrojové kódy

Update SearchHandler.php

Fixes case when associated field value beign submitted.
For example, datagrid contains "user.email" field.
The datagrid form expects "user__email" key, but "user.email" given.
As result, the data will not be bound properly, extra_field violation for the form will be raised and the result will be all records
Alexander před 10 roky
rodič
revize
caf23b65ae
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      Search/SearchHandler.php

+ 1 - 1
Search/SearchHandler.php

@@ -52,7 +52,7 @@ class SearchHandler
             /** @var $filter FilterInterface */
             if ($filter->getOption('global_search', false)) {
                 $filter->setCondition(FilterInterface::CONDITION_OR);
-                $datagrid->setValue($name, null, $term);
+                $datagrid->setValue($filter->getFormName(), null, $term);
                 $found = true;
             }
         }