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

loadDashboard resets filters #96

Open
kajyr opened this issue Feb 7, 2022 · 2 comments
Open

loadDashboard resets filters #96

kajyr opened this issue Feb 7, 2022 · 2 comments

Comments

@kajyr
Copy link

kajyr commented Feb 7, 2022

Hi! I noticed that .loadDashboard resets the filters applied with the .updateFilters call, it is intended?

Let me explain better:

I have 2 dashboards, set up with the same filters. I embed the first

LookerEmbedSDK.createDashboardWithId(dashboard)
    .appendTo("#dashboard")
    .withNext()
    .withFilters({...})
    .build()
    .connect()
    .then((dashboard: LookerEmbedDashboard) => {
      return dashboard;
    });

I then change some toggles in the page, and call dashboard.updateFilters({...}).

Now if I change the dashboard to the second "page" with dashboard.loadDashboard(otherDashboard)
I see that the new dashboard does not have the new filter set, but it went to the default setup in Looker.

In case this is not a bug, what is the suggested way to bring the same filters across two (compatible) dashboards?

Thanks!

@EricNelson12
Copy link

This may or may not be related, but calling LookerEmbedSDK.createDashboardWithUrl(mySignedUrlWithSomeParams) and subsequently calling dashboard.loadDashboard(otherDashboard) will cause params like hide_filters to not be applied to the newly loaded dashboard.

Maybe loadDashboard should support withParams ?

@jariahh
Copy link

jariahh commented Nov 4, 2024

I agree, this feels like a major miss. I have to let the new dashboard load, then set the filters and any other options, which causes a long delay for users to see the data they want! Additionally, it makes additional calls to the queries in BigQuery causing more requests and higher costs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants