Ajax views progress type is hardcoded as fullscreen

Created on 12 October 2018, over 6 years ago
Updated 23 June 2023, almost 2 years ago

Similar to https://www.drupal.org/project/drupal/issues/2818463 Provide option to set ajax indicator with .use-ajax and .use-ajax-submit Needs work , there isn't an easy/clean way to change the progress type when using Ajax enabled views. For example, pager links are triggered into the file core/modules/views/js/ajax_view.js, function "Drupal.views.ajaxView":

  // More code...
   this.element_settings = {
      url: ajaxPath + queryString,
      submit: settings,
      setClick: true,
      event: 'click',
      selector: selector,
      progress: { type: 'fullscreen' }
    };
  // More code...

Following same line/method described into the related issue, we could add just a small change to:
1. If attribute "data-progress-type" is available, use it.
2. If not available, fallback to the default "fullscreen".

Some use cases:
1. Having several views into a page, but wanted to show progress loader only for current piece of content.
2. Easy different styling depending on desired view.

Attached a small patch to change one line of code.

Feature request
Status

Needs work

Version

10.1

Component
Views 

Last updated about 7 hours ago

Created by

🇨🇴Colombia waspper

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