Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views Ajax Completed Event

No security coverage Under active development 30 sites

Part of the Views ecosystem · 280 projects

This module provides a JavaScript event that fires when Views AJAX requests have successfully completed. This is particularly useful for projects that don't use jQuery, as it offers an alternative to the built-in jQuery AJAX completion event. The event, named `views_ajax_completed_event:views_ajax_completed`, allows you to access details about the completed view.

Provides for a Javascript event when Views ajax has completed.
This module is useful for projects which do not use JQuery. If jQuery is being used then the ajaxComplete event should suffice.

Features

- Raise the event views_ajax_completed_event:views_ajax_completed on the document object when Views ajax has completed.
- The view_name and the view_display_id can be obtained from the detail property on the event object.

Example code:

(function(Drupal) {
  "use strict";

  Drupal.behaviors.testViewsAjaxCompleted = {
    attach: function(context, settings) {
      if (context === document) {
        document
        .addEventListener('views_ajax_completed_event:views_ajax_completed', function(e) {
          const messages = new Drupal.Message();
          messages.add('Caught Event: views_ajax_completed_event:views_ajax_completed');
          messages.add('event.detail: ' + JSON.stringify(e.detail));
        });
      }
    },
  };
})(Drupal);

Ask your assistant about Views Ajax Completed Event

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Mar 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Slowing

Releases

Version Type Core PHP Release date
1.0.0-beta2 Pre-release 8–11 Nov 19, 2024
1.0.0-beta1 Pre-release 8–10 Mar 12, 2024