Problem/Motivation

When we choose not all filters in the "Views Exposed Filters Summary" area settings, but only several, the "Reset" link still resets all exposed filters, instead of only the chosen ones.

Steps to reproduce

1. Using the default Drupal setup, create a view page listing all nodes, and expose two filters: "Content Type", "Tags".
2. Create a couple of nodes and tags.
3. Add the "Views Exposed Filters Summary" area to the view, in the settings choose only "Tags" filter.
4. Open the view page, choose "Content Type = Article" and "Tags = Tag1", apply the filter.
5. Click on the "Reset" link.

Expected result: Only the "Tags" exposed filter values should be reset.
Actual result: The "Content Type = Article" is reset too.

Proposed resolution

Add handling of the list of selected filters, and skip resetting filters that are not selected.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

murz created an issue. See original summary.

murz’s picture

Status: Active » Needs review

I prepared the MR with the fix, please review.

mably’s picture

Thanks @murz, sounds like an interesting improvement.

Will make a few tweaks and merge it.

mably’s picture

Current implementation is more a "Remove all" than a "Reset", am I right?

But I guess that what it was supposed to do in the first place.

murz’s picture

The "Remove all" is called "Reset" in the code, as I see ;)

mably’s picture

@murz we should be ready for merge, could you have a final look?

murz’s picture

Status: Needs review » Reviewed & tested by the community

Yeah, improvements look good to me, and even still works well! ;) Let's merge!

  • mably committed 554b121d on 3.x authored by murz
    [#3548371] fix: The "Reset" link resets all filters instead of only...
mably’s picture

Assigned: murz » Unassigned
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

mably’s picture

Merged.

Let's wait a few days before releasing 3.3.0-beta1.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.