Forum Discussion

zohebakber's avatar
zohebakber
Cloud Apps
04-05-2023

Hide a tooltip from Filters

Hi Team, 

I want to delete/hide/remove the tooltip coming from the default filters.

Can someone help in this regard?

Thanks in advance

 

3 Replies

Replies have been turned off for this discussion
  • AssafHanina's avatar
    AssafHanina
    Sisense Employee

    Hey zohebakber ,

    Please Paste the following Script in the dashboard Script Editor 
    the Script disable the 'Mouseenter' element which enable the Tooltip of the Filters

    dashboard.on('widgetready', function(dash) {
    const filterElement = $('.ew-i-caption');
    filterElement.off('mouseenter');
    });

    Best Regards

    Assaf

     

  • Hello, I am wondering if there is a way to apply this globally or only for viewers.
    Thanks!

    • AssafHanina's avatar
      AssafHanina
      Sisense Employee

      hey SiftHealthcare ,

      the request is to run the script based on UserRole. 
      the user role of each user can be achieved with Prism global variable.

      the following dashboard script, hide the tooltip only for Consumers(viewers) type of users, but more type of users can be added into role_name variable. 

      dashboard.on('widgetready', function(dash) {
           const role_name = ['consumer']; /* define the rolenames to exclude*/

          if (role_name.includes(prism.user.roleName)) {
                    const filterElement = $('.ew-i-caption');
                    filterElement.off('mouseenter');
               }
      });