Set default tab
Plugin script to set a default active tab each time a dashboard is opened
In dashboards using the Widget Tabber, users may leave the dashboard with a different tab selected. By default, Sisense attempts to preserve the last-used tab when the dashboard is reopened. This behavior can cause confusion if a consistent starting point is needed.
This script ensures that a specified tab (typically the first) is always set as the active tab each time a dashboard is opened. It overrides the viewer's previously saved tab state to provide a consistent default experience.
Add the following script to QBeeQCustomStyling > customStyling.js
prism.on("dashboardloaded", (e, args) => {
var arrWidgets = args.dashboard.widgets.$$widgets;
arrWidgets.forEach(widget => {
if (widget.type === "QBeeQAdvancedWidgetsTabber") {
widget.style.activeTab = 0;
widget.changesMade('QBeeQAdvancedWidgetsTabber', [
'style'
])
}
})
})

Behavior
- The script runs when the dashboard loads.
- It targets the tabber widget and programmatically selects the desired default tab (typically the first).
- It does not persist the viewer’s prior selection; the default is always enforced.
Current Limitations
- The script currently applies only to a single tabber widget per dashboard.
- If multiple tabbers are present, only the first one will reset as expected—others may retain their previously selected state.
Did this answer your question?
😞
😐
🤩
Last updated on April 23, 2025