Allow dropdown to stay open

Created on 17 April 2024, over 1 year ago

Problem/Motivation

When using the BEF checkboxes with ajax and autosubmit, the dropdowns automatically close when you uncheck all options within a filter and it reloads. It would be helpful to have the option to not have this happen for users who want to check another box in the same category but have unchecked another option.

Steps to reproduce

Create an exposed filter to a taxonomy
Apply the 'Make filter options collapsible' from BEF advanced options
Enable ajax and autosubmit
Filter is now collapsed
Use the form and select an option within the filter
Filter is no longer collapsed, option is checked
uncheck filter
filter is now collapsed

Proposed resolution

Allow site builders to specify that they would like the filters to not collapse when reload occurs

User interface changes

None unless user opts in

Data model changes

Config for new option?

✨ Feature request
Status

Active

Version

6.0

Component

Code

Created by

🇺🇸United States cemckinnie

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

Comments & Activities

  • Issue created by @cemckinnie
  • 🇺🇸United States smustgrave
  • Status changed to Postponed: needs info 5 months ago
  • 🇺🇸United States smustgrave

    May need some more info. Isn’t that the purpose of the auto submit? Not submitting seems like it would break things

  • 🇺🇸United States smustgrave

    Seems to be covered by ✨ Uncollapsed by default Needs review

  • Status changed to Closed: outdated about 2 months ago
  • 🇺🇸United States yospyn

    Propose re-opening this one, unless it's not possible, as I had a client request same as cemckinnie.

    I did try #3531924: Uncollapsed by default with DEV v7 but we don't want all the accordions open by default -- better to keep them all closed by default (although this is a nice option to have for the future).

    But when you DO open a filter and use it, prefer this filter stay open on page refresh EVEN if it's empty. Which I tricky I imagine because there's nothing in the URL to keep that one particular filter open (since no value is selected, there's no string to keep it open).

Production build 0.71.5 2024