Question

Embed SDK - dashboard's event handlers cannot be fired

  • 19 October 2022
  • 1 reply
  • 63 views

I am using the Looker Embed SDK and Looker Extension Framework to create a page with customized UI and embed dashboard. The embed dashboard is created using the sample code from Looker’s demo (Kitchen Sink). I want to add some codes when dashboard has loaded/filters has changed. According to the sample codes it could be done by adding event handlers. However none of the handlers are fired.

My codes are as follow:

LookerEmbedSDK.init(hostUrl)
const db = LookerEmbedSDK.createDashboardWithId(dashboardId as number)
if (dashboardNext) {
  db.withNext()
}
db.appendTo(el)
.on('dashboard:run:start', (event: DashboardEvent) => {
  // some code
})
.on('dashboard:run:complete', (event: DashboardEvent) => {
  // some code
})
.on("dashboard:filters:changed", (event: DashboardEvent) => {
  // some code
})
.on("drillmenu:click", canceller)
.on("drillmodal:explore", canceller)
.on("dashboard:tile:explore", canceller)
.on("dashboard:tile:view", canceller)
.build()
.connect()
.then(setupDashboard)
.catch((error: Error) => {
  console.error('Connection error', error)
})

 

My colleagues have another project 8 months ago, the codes above used to work successfully. We wonder if the SDK has been changed or the Looker environment has been changed.


1 reply

I have asked for technical support but so far the only solution to this problem is to turn off Enhanced Extension Loading, and no further support for me since my codes are “customized”. I hope the Looker team could look into this soon.

 

Reply