Embed SDK - loadDashboard resets filters

Hello 

We are building a simple HTML application using the Embed SDK. This is the set up:

  • The application allows users to switch between 2 Looker dashboards
  • The dashboards have a few filters in common (e.g. ‘date’ and ‘tag’)
  • Filter selections should apply to both dashboards 

In order to achieve this, we’re externalising the filters and using the SDK to apply them dynamically based on the user selection. 

However - we noticed that .loadDashboard resets the filters previously applied with the .updateFilters call. Is this intended? 

---

Here’s a more detailed walkthrough. First we embed the first dashboard: 

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

Then we change some toggles in the HTML page, and call dashboard.updateFilters({...}).

At this point, 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!

0 0 313