Merge pull request #7086 from GSadee/grid-filters-fixes

[Grid] Fix entity filter to accept only fields option
This commit is contained in:
Paweł Jędrzejewski 2016-12-14 13:25:49 +01:00 committed by GitHub
commit 13cf22f2f4
2 changed files with 1 additions and 4 deletions

View file

@ -33,8 +33,6 @@ final class EntityFilterType extends AbstractType
'placeholder' => 'sylius.ui.all',
])
->setRequired('class')
->setDefined('field')
->setAllowedTypes('field', 'string')
->setDefined('fields')
->setAllowedTypes('fields', 'array')
;

View file

@ -28,8 +28,7 @@ final class EntityFilter implements FilterInterface
return;
}
$field = isset($options['field']) ? $options['field'] : $name;
$fields = isset($options['fields']) ? $options['fields'] : [$field];
$fields = isset($options['fields']) ? $options['fields'] : [$name];
$expressionBuilder = $dataSource->getExpressionBuilder();