Skip to content

Commit

Permalink
Merge pull request #4090 from kubeshop/mm/fix/toggleleftmen
Browse files Browse the repository at this point in the history
fix: toggle dashboard left menu
  • Loading branch information
mortada-codes committed Jun 20, 2023
2 parents 0821ab6 + cd7e617 commit 7ff4849
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/organisms/PaneManager/PaneManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const PaneManager: React.FC = () => {
const currentActivity = useMemo(() => activities.find(a => a.name === leftMenuSelection), [leftMenuSelection]);

const showClosedPanePlaceholder = useMemo(
() => !leftMenuActive && currentActivity?.name === 'explorer',
() => !leftMenuActive && ['explorer', 'dashboard'].includes(currentActivity?.name || ''),
[currentActivity?.name, leftMenuActive]
);

Expand Down Expand Up @@ -151,7 +151,8 @@ const PaneManager: React.FC = () => {
isLeftActive={leftMenuActive}
paneCloseIconStyle={{top: '20px', right: '-8px'}}
left={
currentActivity?.name !== 'explorer' || (leftMenuActive && currentActivity.name === 'explorer')
!['explorer', 'dashboard'].includes(currentActivity?.name || '') ||
(leftMenuActive && ['explorer', 'dashboard'].includes(currentActivity?.name || ''))
? currentActivity?.component
: undefined
}
Expand All @@ -167,7 +168,7 @@ const PaneManager: React.FC = () => {
<ActionsPane />
)
}
leftClosable={currentActivity?.name === 'explorer'}
leftClosable={['explorer', 'dashboard'].includes(currentActivity?.name || '')}
onCloseLeftPane={() => dispatch(toggleLeftMenu())}
defaultSizes={columnsSizes}
onDragEnd={handleColumnResize}
Expand Down

0 comments on commit 7ff4849

Please sign in to comment.