Disable throbber on view only when auto refresh

Created on 4 June 2024, 5 months ago

I wanted to allow the AJAX throbber on the view, but didn't want it to appear each time the auto refresh was running. I added this code into the js file after the variable definitions. (line 9 or so).

// hides the throbber on refresh for views that use autorefresh
for(var i in Drupal.views.instances) {
  let view_set = Drupal.views.instances[i].settings;
  if(view_set.view_name == view_name && view_set.view_display_id == view_display) {
    if(Drupal.views.instances[i].hasOwnProperty('refreshViewAjax')) {
      Drupal.views.instances[i].refreshViewAjax.progress = {type: 'none'};
    }
  }
}

There could be a setting for this in the header area plugin to allow changing the throbber and have 'none' as one of the options. This is only used during the auto refresh. I think at least a checkbox to turn this feature on and off would be nice. I just have it on all the time, but probably should have a way to control this per view.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States DustinYoder

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

Comments & Activities

Production build 0.71.5 2024