Problem/Motivation

I have a view with better exposed filters as links
When I reset selected filter, the paramaters in URL are not removed
So when I select a new filter value it is added to previos selection and not used as new

I tested this :
- without AJAX reset button is working correctly
- issue is with Exposed filter widget links and Default (so it is not related to widget bef_links

Steps to reproduce

1. View with exposed filter as BEF links, and reset button, AJAX enabled
2. Select one of tags (click on link filter) - AJAX results loaded and filter parameter is added into URL
3. Click on reset button - AJAX results loaded, exposed filters cleared, but they stay as parameters in URL, only reset=Reset added to URL
4. Select one of tags (click on link filter) - the result is merge of previous filter and new filter

Proposed resolution

Reset button should update URL parameters - remove filters

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

jiskra created an issue. See original summary.

grevil made their first commit to this issue’s fork.

grevil’s picture

Title: Reset Button does not reset filters after a new selection » AJAX only: Reset Button does not reset filters after a new selection and active filters are not removable
Version: 7.1.1 » 7.1.x-dev
StatusFileSize
new4.32 KB

I have a similiar issue, where if I apply a filter and the filter bubble appears:
screenshot

And now I try to remove the filter through pressing on the x, nothing happens and the filter stays.

I can confirm, that if I disable AJAX on the view, everything works as expected.

foxy-vikvik’s picture

Totally the same issue ..&reset=Reset at the end and the filters are not removed. I have taxonomy terms select

foxy-vikvik’s picture

docroot/core/modules/views/js/ajax_view.js:157

  Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () {
    const that = this;
    this.exposedFormAjax = [];
    // Exclude the reset buttons so no AJAX behaviors are bound. Many things
    // break during the form reset phase if using AJAX.
    $(
      'input[type=submit], button[type=submit], input[type=image]',
      this.$exposed_form,
    ).not('[data-drupal-selector=edit-reset]') 

smustgrave made their first commit to this issue’s fork.

smustgrave’s picture

Status: Active » Needs review
foxy-vikvik’s picture

Patch for Better Exposed filters 7.1.1 tag

grevil’s picture

smustgrave’s picture

Anyone able to verify this fix?