You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "KnightWorker37 (via GitHub)" <gi...@apache.org> on 2024/05/02 10:42:36 UTC

Re: [I] Height of an embedded Dashbaord [superset]

KnightWorker37 commented on issue #5197:
URL: https://github.com/apache/superset/issues/5197#issuecomment-2090166321

   A bit old but if you look at the superset embed SDK's [`embedDashboard`](https://github.com/apache/superset/blob/master/superset-embedded-sdk/src/index.ts#L79) it returns a callback:
   ```js
   // ...
   return {
       getScrollSize,
       unmount,
       getDashboardPermalink,
       getActiveTabs,
     };
   }
     ```
     
     So you can call it to get the height:
     ```js
   useEffect(() => {
       const dashboard = embedDashboard();
       const { width, height } = await dashboard.getScrollSize();
       // proceed to use height in your page!
   })


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org