Open aegladkikh opened 3 years ago
Have you tried using configureFilters function?
public function configureFilters(Filters $filters): Filters
{
return $filters
->add('title')
->add('price')
->add('published')
;
}
Okay I will try
Hi, I can confirm there is a typing issue: From master via Github: https://github.com/EasyCorp/EasyAdminBundle/blob/master/src/Config/Crud.php#L234 Regards
Hi, i try to use this:
public function configureCrud(Crud $crud): Crud { return $crud ->setFilters([]) ->setPaginatorPageSize(30); }
the setFilters function takes an array or null as arguments.
in the code of the function itself, $ this-> dto-> setFiltersConfig ($ filters) is called;
and here $ filters should be FilterConfigDto $ filterConfig
from here I get the type mismatch execution.
Log:
EasyCorp\Bundle\EasyAdminBundle\Dto\CrudDto::setFiltersConfig(): Argument #1 ($filterConfig) must be of type EasyCorp\Bundle\EasyAdminBundle\Dto\FilterConfigDto, array given, called in /app/vendor/easycorp/easyadmin-bundle/src/Config/Crud.php on line 227