[Dashboard] Landing on specific tabs from URL
I want to be able to land on specific dashboard tab, based upon the url params. For instance, give this url superset/dashboards/2?tab=3
The user should be able to land on this specific tab after entering this link in the browser.
Problems:
- What if there is multiple tabs in a dashboard? How would know which tab to set?
If you know javascript, try to run this script after necessary modification `function selectTab(){
//collect your URL parameter
var objParam = new URLSearchParams(window.location.search);
var tabParam = objParam.get('tab');
var tabName = "";
//tab name is the value showing on each tab.
if(!tabParam) return false;
if(tabParam =="3"){
tabName = "Overview";
} else if(tabParam=="k"){
tabName = "KPI";
} else if (tabParam == "s"){
tabName = "Sales";
}
$('ul.nav.nav-tabs li a').children().find("input").each(function(){
if($(this).val()==tabName){
$(this).trigger("click");
}
});
}`
related to #6964 @graceguo-supercat is working on it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.