Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dashboard] Landing on specific tabs from URL #7116

Closed
hughhhh opened this issue Mar 25, 2019 · 3 comments
Closed

[Dashboard] Landing on specific tabs from URL #7116

hughhhh opened this issue Mar 25, 2019 · 3 comments
Labels
enhancement:request Enhancement request submitted by anyone from the community inactive Inactive for >= 30 days

Comments

@hughhhh
Copy link
Member

hughhhh commented Mar 25, 2019

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?
@bvpillai
Copy link

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");
             }

        });

}`

@kristw kristw added the enhancement:request Enhancement request submitted by anyone from the community label Mar 27, 2019
@kristw
Copy link
Contributor

kristw commented Mar 27, 2019

related to #6964
@graceguo-supercat is working on it.

@stale
Copy link

stale bot commented May 27, 2019

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.

@stale stale bot added the inactive Inactive for >= 30 days label May 27, 2019
@stale stale bot closed this as completed Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement:request Enhancement request submitted by anyone from the community inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

3 participants