patternfly-org
patternfly-org copied to clipboard
Bug #4808: Navigation sidebar closes on item selection for narrower screens
trafficstars
Summary
This PR addresses Bug #4808. The navigation sidebar now automatically closes when a user selects an item while the sidebar is in a collapsible state.
What was done
- Added an event listener for navigation item selection.
- Triggered sidebar collapse programmatically on selection.
- Verified locally on Node 22 + Yarn 4; sidebar closes correctly after item selection.
Related issue
Fixes #4808
Testing
- Confirmed sidebar closes after selection.
- HMR and other sidebar behaviors remain functional.
Notes
No changes to wider-screen behavior; the fix only applies when the sidebar is collapsible.