Making 'helper functions' (to do ajax submissions) globally usable

Created on 28 September 2023, about 1 year ago
Updated 21 March 2024, 8 months ago

Problem/Motivation

Using contrib facet widget (like drupal/facets_date_range) I encountered the following issue: Selecting date causes page reload when AJAX is enabled 🐛 Selecting date causes page reload when AJAX is enabled Active . Indeed, using that module, when you select a new date, this fully reload the page instead of use the ajax feature.

Steps to reproduce

  • Install drupal/facets_date_range module
  • Attach a facete, that use the facets_date_range widget, to a view
  • Make sure that the view has the ajax option enabled
  • Choose a date

Proposed resolution

A simple solution would be (as done for the attached patch) to move all facets/js/facets-views-ajax.js "Helper functions" inside the Drupal.behaviors.facetsViewsAjax object, so that you can access to updateFacetsView function from others.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs work

Version

1.6

Component

Code

Created by

🇮🇹Italy reinchek Napoli 🌋, 🇮🇹

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024