"Hide filter, if no options" does not work if filter is not set to allow multiple

Created on 16 May 2023, over 1 year ago
Updated 12 October 2023, about 1 year ago

Problem/Motivation

The "Hide filter, if no options" does not work if:

  1. The exposed filter is not set to allow multiple items
  2. The Better Exposed Filters "Make filter options collapsible" option is set

Steps to reproduce

  1. Create a taxonomy vocabulary and add a field to a node type. Don't tag any content.
  2. Create a node view, add your taxonomy field as a filter. Use "select list" as output and keep "Allow multiple selections" unchecked.
  3. Set the exposed filter to use BEF. Choose "Checkbox/Radios" as the Exposed filter widget, and check "Show only used terms" and " Hide filter, if no options"
  4. See that the exposed filter still displays on the view, showing with "- Any -" but no terms.

Next, go back in and change the exposed filter to allow multiple items. See that the filter is now hidden (the "Hide filter if no options is working"). However, if the "Enable auto-submit" and "Hide the Submit Button" have not been set, and this is the only exposed filter, the "Apply" button will still show up.

Finally, go back in and change the BEF settings and check "Make filter options collapsible". See that the collapsed widget still appears (but it's empty).

Summary of issues

There are actually three issues happening here:

  1. "Hide filter, if no options" only works if "Allow multiple selections" is checked
  2. The "Make filter options collapsible" widget still appears even if the filter is hidden
  3. The submit button still appears even if the filter is hidden and this is the only exposed filter.
πŸ› Bug report
Status

Closed: cannot reproduce

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada megan_m

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024