- Issue created by @mably
- Merge request !11Issue #3420648: remove hard coded 'Any' template name filter option → (Open) created by mably
- Status changed to Postponed: needs info
10 months ago 3:04pm 12 February 2024 - 🇨🇦Canada _randy
I'm not sure I see this issue. I only see "ANY" as an option once regardless if it is required or not.
If we were to be a bit more precise, we'd probably do a detection of the filter being required rather than just removing it altogether.
More like this:
$is_required = $this->options['expose']['required'] ?? FALSE; if(!$is_required) { $options[0] = $this->t(' - Any -'); }
- 🇫🇷France mably
Why not simply let Views handle it?
It works perfectly fine on my instances on Drupal 10.2.3 and 9.5.11.
Here is what I get when I don't make the filter required:
- Status changed to Needs review
3 months ago 8:58pm 27 September 2024 - 🇫🇷France mably
MR rebased.
For your information, the line of code removed by this current MR generates an error with code validation because translated strings shouldn't start with a space character.