mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Prevent API requests before instance ID is known
This commit is contained in:
parent
b10bc961e9
commit
f81614dcbe
@ -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;
|
||||
|
@ -21,7 +21,7 @@ interface PluginPanelParameters {
|
||||
target: HTMLDivElement;
|
||||
props: PluginPanelProps;
|
||||
targetModel?: ModelType | string;
|
||||
targetId?: number;
|
||||
targetId?: number | null;
|
||||
api: AxiosInstance;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user