Skip to content

Commit

Permalink
fix: left menu icon selection state
Browse files Browse the repository at this point in the history
  • Loading branch information
devcatalin committed Feb 14, 2022
1 parent c123455 commit abafe4c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/components/organisms/PaneManager/MenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ const MenuButton: React.FC<IMenuButtonProps> = props => {
shallowEqual
);

const isAnyHelmValuesFileSelected = useMemo(() => {
return Object.values(helmValuesMap).some(v => v.isSelected);
}, [helmValuesMap]);

const isAnySectionSelected = useMemo(() => {
if (!sectionInstanceByName) {
return false;
Expand All @@ -69,11 +65,8 @@ const MenuButton: React.FC<IMenuButtonProps> = props => {
const style: React.CSSProperties = {};

const hasGradientBackground = useMemo(() => {
return Boolean(
(isAnySectionSelected || (shouldWatchSelectedPath && selectedPath && !isAnyHelmValuesFileSelected)) &&
(!isSelected || !isActive)
);
}, [isAnySectionSelected, shouldWatchSelectedPath, selectedPath, isAnyHelmValuesFileSelected, isSelected, isActive]);
return Boolean((isAnySectionSelected || (shouldWatchSelectedPath && selectedPath)) && (!isSelected || !isActive));
}, [isAnySectionSelected, shouldWatchSelectedPath, selectedPath, isSelected, isActive]);

if (hasGradientBackground) {
if (isHovered) {
Expand Down

0 comments on commit abafe4c

Please sign in to comment.