Links using Ajax fails to submit on click

Created on 26 July 2022, over 2 years ago
Updated 10 April 2024, 9 months ago

Problem/Motivation

I have a need to display the filter options as links that when clicked, would apply the filter and render the results using ajax. I had set the views display option Use AJAX:Yes, and in BEF set the 'exposed filter widget' to 'Links'. After looking at bef_links_use_ajax.js I noticed Enable auto-submit wasn't necessary, and Hide submit button needed to be un-checked, as bef_links_use_ajax.js submits the form by targeting the form submit element.

It's targeting the form submit element with a class of 'form-submit', while mine is 'js-form-submit'.

Drupal 9.4.3, BEF 8.x-5.x-dev.

Proposed resolution

It wouldn't hurt to have it check for either class and submit. Check if '.js-form-submit' exists then submit, else submit the original '.form-submit' classed element.

πŸ› Bug report
Status

Closed: cannot reproduce

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States spelcheck

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024