diff --git a/src/components/ToolBar/AppMenu/index.tsx b/src/components/ToolBar/AppMenu/index.tsx index 9eb7f5a9..13763f0b 100644 --- a/src/components/ToolBar/AppMenu/index.tsx +++ b/src/components/ToolBar/AppMenu/index.tsx @@ -98,6 +98,7 @@ export const AppMenu = (props: DropdownMenuProps) => { (id) => apps[id].status === AppStatus.Active, ) if (activeIds.length === 0) { + setComponentList([]) return } @@ -110,7 +111,10 @@ export const AppMenu = (props: DropdownMenuProps) => { components.forEach((component: ComponentMetadata) => { const componentId: string = component.id const componentType: string = component.type - if (componentType === ComponentType.Menu) { + if ( + componentType === ComponentType.Menu && + app.status === AppStatus.Active + ) { // Add menu only componentList.push([appId, componentId]) } diff --git a/src/components/Workspace/SidePanel/TabContents.tsx b/src/components/Workspace/SidePanel/TabContents.tsx index 2a12575d..99f51e1a 100644 --- a/src/components/Workspace/SidePanel/TabContents.tsx +++ b/src/components/Workspace/SidePanel/TabContents.tsx @@ -8,6 +8,7 @@ import { } from '../../../models/AppModel' import { ComponentMetadata } from '../../../models/AppModel/ComponentMetadata' import ExternalComponent from '../../../components/AppManager/ExternalComponent' +import { AppStatus } from '../../../models/AppModel/AppStatus' /** * Actual contents of the side panel @@ -26,7 +27,10 @@ export const getTabContents = (selectedIndex: number): JSX.Element[] => { if (components === undefined) return components.forEach((component: ComponentMetadata) => { - if (component.type === AppComponentType.Panel) { + if ( + component.type === AppComponentType.Panel && + app.status === AppStatus.Active + ) { const PanelComponent: any = ExternalComponent( app.id, './' + component.id, @@ -58,6 +62,7 @@ export const getTabContents = (selectedIndex: number): JSX.Element[] => { }, ) } + return [