浏览代码

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 10 年之前
父节点
当前提交
caf23b65ae
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;
             }
         }