diff --git a/src/frontend/src/components/nav/PanelGroup.tsx b/src/frontend/src/components/nav/PanelGroup.tsx index c8bffe052d..51aae32d1f 100644 --- a/src/frontend/src/components/nav/PanelGroup.tsx +++ b/src/frontend/src/components/nav/PanelGroup.tsx @@ -29,11 +29,22 @@ import { Boundary } from '../Boundary'; import { StylishText } from '../items/StylishText'; import { PanelType } from './Panel'; +/** + * Set of properties which define a panel group: + * + * @param pageKey - Unique key for this panel group + * @param panels - List of panels to display + * @param targetModel - The target model for this panel group + * @param targetId - The target ID for this panel group (set to *null* for groups which do not target a specific model instance) + * @param selectedPanel - The currently selected panel + * @param onPanelChange - Callback when the active panel changes + * @param collapsible - If true, the panel group can be collapsed (defaults to true) + */ export type PanelProps = { pageKey: string; panels: PanelType[]; targetModel?: ModelType | string; - targetId?: number; + targetId?: number | null; selectedPanel?: string; onPanelChange?: (panel: string) => void; collapsible?: boolean; diff --git a/src/frontend/src/components/plugins/PluginPanel.tsx b/src/frontend/src/components/plugins/PluginPanel.tsx index aef7959ed3..0da74d05a5 100644 --- a/src/frontend/src/components/plugins/PluginPanel.tsx +++ b/src/frontend/src/components/plugins/PluginPanel.tsx @@ -21,7 +21,7 @@ interface PluginPanelParameters { target: HTMLDivElement; props: PluginPanelProps; targetModel?: ModelType | string; - targetId?: number; + targetId?: number | null; api: AxiosInstance; }