Short description of what this feature will allow to do:
In the AbstractCrudController::configureCrud method, there is a way to pass a set of searchable fields via setSearchFields():
public function configureCrud(Crud $crud): Crud
{
return $crud
...
->setSearchFields(['name', 'description', 'seller.email', 'seller.address.zipCode'])
...
https://symfony.com/bundles/EasyAdminBundle/current/crud.html#search-order-and-pagination-options
However, if you have an association, you would need to explicitly declare all of the searchable fields, which could be quite a few:
// Manually include default search fields, and an association property field
$crud->setSearchFields(['name','description',...,...,'association_field.property'];
Example of how to use this feature
It would be nice to be able to simply tack on the association field rather than copy paste all the other fields and then add the other field, something like:
// Include all the default property fields, and the additional association property:
$crud->addSearchField('association_field.property');
and / or
$crud->addSearchFields(['association_field.property']);
Short description of what this feature will allow to do:
In the
AbstractCrudController::configureCrudmethod, there is a way to pass a set of searchable fields viasetSearchFields():https://symfony.com/bundles/EasyAdminBundle/current/crud.html#search-order-and-pagination-options
However, if you have an association, you would need to explicitly declare all of the searchable fields, which could be quite a few:
Example of how to use this feature
It would be nice to be able to simply tack on the association field rather than copy paste all the other fields and then add the other field, something like:
and / or