Open seb-jean opened 4 years ago
@seb-jean I'll just answer here, to keep the PR clean of off-topic discussion.
The main difference between AssociationField
and EntityFilter
is, that the autocomplete with all the added complexity of that only exists for the field, not the filter (at least for now). There are also no "custom options" for filters at all, and they are mainly wrappers around a FormType
only (since they are only used in the filter form, there is no other "view").
We should still aim to have a similar API (I went for ->modifyQuery
now, because you can not only filter, but also change sort etc.), but the implementation will be different (only the part with the query_builder
FormType option will be similar). I'll create a PR for the filter later 🙂
Thanks @lukasluecke for PR and for the answer :).
Not sure if I should create another ticket: I understand that the filter is very simple. But it would be great if it could at least use the query builder from the related crud (if there is one). I didn't check the code yet, but maybe it is easier to add instead of complex customization.
This ticket joins an issue: #3476.
It would be great to filter the drop-down list of EntityFilter :
For example :
Thanks :)