소스 검색

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;
             }
         }