Skip to content

Commit

Permalink
Fix widget arg type in the event handler, export DashboardPlugin as a…
Browse files Browse the repository at this point in the history
… named export next to the default WidgetPlugin
  • Loading branch information
vbabich committed Feb 29, 2024
1 parent f1c1cdd commit e8ed513
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/plotly-express/src/js/src/DashboardPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
PanelEvent,
useListener,
} from '@deephaven/dashboard';
import type { VariableDefinition } from '@deephaven/jsapi-types';
import type { VariableDescriptor } from '@deephaven/jsapi-types';
import PlotlyExpressChartPanel from './PlotlyExpressChartPanel.js';
import type { PlotlyChartWidget } from './PlotlyExpressChartUtils.js';

Expand All @@ -27,9 +27,9 @@ export function DashboardPlugin(
fetch: () => Promise<PlotlyChartWidget>;
metadata?: Record<string, unknown>;
panelId?: string;
widget: VariableDefinition;
widget: VariableDescriptor;
}) => {
const { type, title } = widget;
const { type, name } = widget;
if (type !== 'deephaven.plot.express.DeephavenFigure') {
return;
}
Expand All @@ -42,13 +42,13 @@ export function DashboardPlugin(
id: panelId,
metadata: {
...metadata,
name: title,
figure: title,
name,
figure: name,
type,
},
fetch,
},
title,
title: name,
id: panelId,
};

Expand Down
5 changes: 5 additions & 0 deletions plugins/plotly-express/src/js/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import { PlotlyExpressPlugin } from './PlotlyExpressPlugin.js';

// Export legacy dashboard plugin as named export for backwards compatibility
export * from './DashboardPlugin.js';
export * from './PlotlyExpressChartModel.js';
export * from './PlotlyExpressChartUtils.js';

export default PlotlyExpressPlugin;

0 comments on commit e8ed513

Please sign in to comment.