Hi rafaelderas ,
You can set any tab to be active when the dashboard loads with the following script. This script highlight the tabber option as well as active it:
let tabName = 'Tab3';
widget.style.activeTab = widget.tabs.findIndex(el=>el.title == tabName);
The complete script will looks like this:
widget.on('render',function(w, e) {
e.prefixText = '';
e.suffixText = '';
e.selectedColor = '#86b817'; /*The color of the chosen title*/
e.fontColor = '#cccccc'; /*The color of the unchosen titles*/
e.elementWidth = '103%';
e.descColor = '#a5a5a5';
e.parentMarginLeft = '-15px';
e.height = 32; /* affects the tabber widget default high*/
});
widget.tabs = [
{
title: "Tab1",
displayWidgetIds : ["6568134f2968560034f519b1"],
hideWidgetIds : ["64df5b4ab729680033167174", "656961412968560034f51a7e", "65673d042968560034f5195a"]
},
{
title: "Tab2",
displayWidgetIds : ["64df5b4ab729680033167174", "656961412968560034f51a7e"],
hideWidgetIds : ["6568134f2968560034f519b1", "65673d042968560034f5195a"]
},
{
title: "Tab3",
displayWidgetIds : ["65673d042968560034f5195a"],
hideWidgetIds : ["6568134f2968560034f519b1", "64df5b4ab729680033167174", "656961412968560034f51a7e"]
}
];
let tabName = 'Tab3'
widget.style.activeTab = widget.tabs.findIndex(el=>el.title == tabName)
Feel free to reach out if you have further questions, we're always happy to help 🙂
[email protected]
Paldi Solutions