ASU / asu-unity-stack

ASU Unity Design System
https://unity.web.asu.edu/
Other
13 stars 8 forks source link

WS2-1634: fix(app-degree-pages): add check to the anchorMenu for false values #1133

Closed bebaps closed 1 year ago

bebaps commented 1 year ago

Description

Currently, the Anchor Menu on the degree pages renders by default with no items. In this state, there is a bug where if you scroll down the page, then scroll back up the page, the menu will then disappear completely.

This PR adds a check to the OnThisPageAnchorMenu component to see if all values from the anchorMenu prop are false. If true, the component returns null.

This really may not be the best place to put this logic, or returning null for a component might just be a terrible idea. The end goal is to prevent the component from rendering at all if all the initial anchorMenu values are false. Please suggest changes as needed.

Links

Checklist

Browsers

bebaps commented 1 year ago

Comment to myself so I don't forget, update this PR as follows:

bebaps commented 1 year ago

@scott-williams-az requested changes made, verified they work as expected.