rajuw892 opened a new issue, #32177:
URL: https://github.com/apache/superset/issues/32177

   ### Bug description
   
   const SupersetDashboard = ({ dashboardId }: any) => {
     useEffect(() => {
       const mountPoint = document.getElementById('superset-container');
       if (!mountPoint) return;
       embedDashboard({
         id: dashboardId,
         supersetDomain: SUPERSET_DOMAIN,
         mountPoint,
         fetchGuestToken: () => getToken(dashboardId),
         dashboardUiConfig: {
           // hideTitle: true,
           // hideTab:true
           filters: {
             expanded: false,
           },
           // urlParams: {
           //   standalone: 3, // here you can add the url_params and there 
values
           // },
         },
       });
       var iframe = document.querySelector('iframe');
       if (iframe) {
         iframe.style.width = '100%'; // Set the width of the iframe
         iframe.style.minHeight = '85vh'; // Set the height of the iframe
         iframe.style.border = 'none';
       }
     }, []);
   
     return <div id="superset-container"></div>;
   };
   
   export default SupersetDashboard;
   here is the function that implementing this superset npm module.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to