rindy8707 opened a new issue, #23793:
URL: https://github.com/apache/superset/issues/23793
A clear and concise description of what the bug is.
I write embed dashboard on react applicaton.
"An embed dashboard only appears in a very small section of the entire web
page. I have tried applying CSS and iframes, but the window size cannot be
adjusted. Can you help me out?"
My Code!
import { useEffect } from "react";
import { embedDashboard } from "@superset-ui/embedded-sdk";
import "./App.css"
function App() {
useEffect(() => {
async function fetchGuestTokenFromBackend() {
//function
return jsonResponse_guest?.token
}
const embed = async () => {
embedDashboard({
id:"###",
supersetDomain: "http://localhost:8088",
mountPoint: document.getElementById("my-superset-container"),
fetchGuestToken: () => fetchGuestTokenFromBackend(),
dashboardUiConfig: { // dashboard UI config: hideTitle,
hideTab, hideChartControls, filters.visible, filters.expanded (optional)
hideTitle: true,
filters: {
expanded: true,
}
},
dashboardLayout: "fullscreen",
});
}; embed();
}, []); return (
<div id="my-superset-container">
</div>
);
}
export default App;
#### How to reproduce the bug
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Expected results
what you expected to happen.
### Actual results
what actually happens.
#### Screenshots
If applicable, add screenshots to help explain your problem.
### Environment
(please complete the following information):
- browser type and version:
- superset version: 2.1.0
- python version: 3.8
- node.js version: 18.16
- any feature flags active:
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included
it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version
of superset.
- [ ] I have checked the issue tracker for the same issue and I haven't
found one similar.
### Additional context
Add any other context about the problem here.
--
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]