Knowledge Base Article

How to handle or disable widget selection behavior in Sisense [Linux]

In Sisense you can click specific portions of most widgets (except for table and indicator widgets), to select the widget's portion. This will apply filters in the dashboard according to the selected data by adding a filter, but with some lesser-known methods, you can modify or disable this behavior.

Step-by-Step Guide

Options Without Scripting

By default, if you left-click an item in a widget, it will automatically select and add a dashboard filter according to the selection (you can also make multiple selections, as shown in this document).

Example: clicking on 07/2025 automatically added a filter.

You can disable this by opening the actions menu (the “…” beside the download widget option). Disabling the option removes filtering, but still shows the actions pop-up.

 

 

Options Using Scripting

If you use a script, you can have more control over widget click behavior. Below are some lesser-known methods to control this:

  • widget.metadata.$$widget.disableSelector
    Disables all behaviors on clicking slices, including highlighting and the actions pop-up.
  • widget.metadata.selectionData()
    Returns an array of the current selection data. Example output:
{
  "dim": "[SalesList.csv.created_at (Calendar)]",
  "members": ["2025-05-01T00:00:00"],
  "level": "months"
}
  • widget.metadata.clearSelection
    Clears all selections, replicating the Clear Selection button.

Conclusion

Sisense selection behavior can be modified or disabled depending on your needs. Without scripting, you can turn off default filters, but this will not disable the pop-up. With scripting, you can completely disable interactions, access current selections, or clear them programmatically.

References/Related Content 


Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.

Published 09-29-2025

1 Comment

  • msantana's avatar
    msantana
    Sisense Employee

    A way to disable selection by a widget's script:

    (() => {
      widget.on("initialized", () => {
        widget.metadata.$$widget.disableSelector = true;
      })
    })()

    Another to disable for all dashboard's widgets, by a dashboard's script:

    (() => {
      // Simple version to disable selection for all widgets
      const disableAllSelections = () => {
        // Get all widgets from dashboard
        const widgets = dashboard?.widgets || Object.values(prism?.widgets || {});
        
        widgets.forEach((widget, index) => {
          if (widget) {
            const applyDisable = () => {
              if (widget.metadata?.$$widget) {
                widget.metadata.$$widget.disableSelector = true;
              }
            };
            
            // Apply immediately if already initialized
            if (widget.metadata?.$$widget) {
              applyDisable();
            } else {
              // Wait for initialization
              widget.on?.("initialized", applyDisable);
            }
          }
        });
      };
    
      // Run immediately and on dashboard events
      disableAllSelections();
      
      // Listen for dashboard events
      dashboard?.on?.('ready', disableAllSelections);
      dashboard?.on?.('widgetsloaded', disableAllSelections);
    })();