The expected output is that it will reset the exposed filter but it is closing the modal.

Comments

sapna_123 created an issue. See original summary.

-SNap-’s picture

Issue summary: View changes

hi, i'm not providing a patch file (because i made a solution for our custom filters), but here is an example of fix that solves your problem:

in entity_browser.view.js simply add this code

        $(once('submit-reset-filter', views_instance.$exposed_form)).find('input[data-drupal-selector="edit-reset"]').each(function () {
          $(this).on('click', function (event) {
            event.preventDefault();

            views_instance.$exposed_form.closest('form')
              .find('input[type=text], textarea, select')
              .val('')
              .prop('selected', false)
              .prop('checked', false);

            views_instance.$exposed_form.find('input[type="submit"]').first().click();
          })
        });