Problem/Motivation
I added a view which implements multiple entity reference exposed filters and a date range filter. When users pick a date range that doesn't return results the entity reference exposed filters show all the possible options.
In this case I expect no options to be shown.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | no-results-hide-form-3256177.patch | 617 bytes | chucksimply |
| #2 | no-results-show-all-options-3256177.patch | 681 bytes | fredysan |
Comments
Comment #2
fredysan commentedI found a way to achieve that inside the SelectiveFilterBase.php file.
Comment #3
chucksimply commentedYes! Works great for me. Feel this should be pushed into a release.
Thanks!
Comment #4
chucksimply commentedHmmm... if the exposed filter is totally empty... shouldn't it hide the entire Exposed Filter display?
Request on a similar module for D7 here... https://www.drupal.org/project/views_selective_filters/issues/943724.
Maybe this should be started on a different issue?
Comment #5
chucksimply commentedRan into errors on #2 if there are multiple exposed filters. Also, as mentioned in #4 it only hides the options, not the form.
Here is a new patch that hides the entire form, and handles multiple exposed filters. Only issue I've found... is if "reduce duplicates" is selected on certain exposed filters, the page breaks. Couldn't figure out why. But deselecting "reduce duplicates" fixes it.
Comment #6
ivnish#5 works, thanks!
Comment #8
stomusicTnx for your work, changes were success applied
Comment #9
stomusic