QuickAdminGeneratorBundle icon indicating copy to clipboard operation
QuickAdminGeneratorBundle copied to clipboard

Entity Filter with multiple option

Open npotier opened this issue 1 year ago • 1 comments

Hello, and thank you for this bundle.

it would be super cool to have the ability to filter on multiple entities.

I think minor changes should allow to do so :

in Model/Form/Filter/Type/EntityFilterType.php

➡️ use the option parameter to allow multiple => true

in Model/Form/Filter/EntityFilter.php

➡️ check if multiple values are selected (if (count($form->get($index)->getData()['entity']) > 1) to switch from where xx = yy to where xx IN (yy,zz)

I have already done that in my project. What do you think about a PR on this ?

npotier avatar Oct 02 '24 08:10 npotier

Hi, thanks for the suggestion, sounds like a good idea, a PR would be appreciated if you can :+1: Thanks

Arkounay avatar Oct 02 '24 12:10 Arkounay