Skip to content

Commit

Permalink
fix: Embed-widget with multiple panels not showing panel headers (#2064)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mattrunyon authored Jun 10, 2024
1 parent 1bbcc73 commit 3f45f07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/embed-widget/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
getAllDashboardsData,
listenForCreateDashboard,
CreateDashboardPayload,
DEFAULT_DASHBOARD_ID,
setDashboardPluginData,
stopListenForCreateDashboard,
} from '@deephaven/dashboard';
Expand Down Expand Up @@ -98,7 +97,7 @@ function App(): JSX.Element {
}, [dispatch, user]);

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

const handleGoldenLayoutChange = useCallback(
(newLayout: GoldenLayout) => {
Expand Down

0 comments on commit 3f45f07

Please sign in to comment.