looker-open-source / embed-sdk

The Looker browser embedding SDK
MIT License
72 stars 47 forks source link

.send works with breakpoints but not without #176

Closed RobinShift4 closed 8 months ago

RobinShift4 commented 9 months ago

I have a dashboard which I pass to the following code:

const handleDashboardLoaded = (dashboard) => {
   dashboard.send("dashboard:filters:update", {
      filters: {
        "Calendar Date": "last quarter",
      },
    });
    dashboard.send("dashboard:run");
    setDashboard(dashboard);
  };

If a put breakpoints in the code - the filter is successfully applied. If I let the code run without breakpoints - it doesn't work. I've tried using async/await but that hasn't worked. What's going on in the send function?