Skip to content

Commit 3f45f07

Browse files
authored
fix: Embed-widget with multiple panels not showing panel headers (#2064)
This should fix embed-widget not showing the panel headers when there are multiple panels in a widget, but it's not a dashboard. The issue is embed-widget is loading the layout from `dashboardData` and the `DEFAULT_DASHBOARD_ID` stores its data in `workspaceData` while all other IDs use `dashboardData`. Tested with widget with just 1 panel, widget with multiple panels, and widget that is a dashboard.
1 parent 1bbcc73 commit 3f45f07

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/embed-widget/src/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
getAllDashboardsData,
1919
listenForCreateDashboard,
2020
CreateDashboardPayload,
21-
DEFAULT_DASHBOARD_ID,
2221
setDashboardPluginData,
2322
stopListenForCreateDashboard,
2423
} from '@deephaven/dashboard';
@@ -98,7 +97,7 @@ function App(): JSX.Element {
9897
}, [dispatch, user]);
9998

10099
const [goldenLayout, setGoldenLayout] = useState<GoldenLayout | null>(null);
101-
const [dashboardId, setDashboardId] = useState(DEFAULT_DASHBOARD_ID);
100+
const [dashboardId, setDashboardId] = useState('default-embed-widget'); // Can't be DEFAULT_DASHBOARD_ID because its dashboard layout is not stored in dashboardData
102101

103102
const handleGoldenLayoutChange = useCallback(
104103
(newLayout: GoldenLayout) => {

0 commit comments

Comments
 (0)