Navigation: Revert new items auto-expanding (#101230)

pull/101277/head
Josh Hunt 5 months ago committed by GitHub
parent 00f51f8b76
commit bceddd78a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      public/app/core/components/AppChrome/MegaMenu/MegaMenuItem.tsx

@ -35,7 +35,7 @@ export function MegaMenuItem({ link, activeItem, level = 0, onClick, onPin, isPi
const isActive = link === activeItem || (level === MAX_DEPTH && hasActiveChild);
const [sectionExpanded, setSectionExpanded] = useLocalStorage(
`grafana.navigation.expanded[${link.text}]`,
Boolean(hasActiveChild || link.isNew)
Boolean(hasActiveChild)
);
const showExpandButton = level < MAX_DEPTH && Boolean(linkHasChildren(link) || link.emptyMessage);
const item = useRef<HTMLLIElement>(null);

Loading…
Cancel
Save