Knowledge Base Article

Auto Collapse Dashboard And Filter Pane

The script below will collapse the dashboard and filter panes when a dashboard first loads. This is helpful when embedding with Iframe and you do not want these panes to show, but do not want to disable them for the user. 
 

Implementation 

Add the following script to each dashboard script you want to collapse the panes upon opening. Save and refresh the dashboard. 
setTimeout(function() {

  if (!$('div#prism-leftview').hasClass('collapsed-pane')) {

$('div.trillapser-container', $('div#prism-leftview')).click();

}

if (!$('div#prism-rightview').hasClass('collapsed-pane')) {

$('div.trillapser-container', $('div#prism-rightview')).click();

}

}, 1000);
Updated 03-02-2023
No CommentsBe the first to comment