Skip to content

🐛 Close sidebar drawer on user selection #1515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2025
Merged

Conversation

dtellz
Copy link
Contributor

@dtellz dtellz commented Mar 2, 2025

Issue (on mobile/small screens): The SidebarItems component has an onClose prop that's being passed to the RouterLink onClick handler, but in the Sidebar component, we are not passing this prop to SidebarItems.

Fix: Now when a user clicks on any navigation item in the sidebar or the logout button, the drawer will automatically close as the new page loads. The onClose function is passed to each RouterLink in the SidebarItems component, which will trigger when a user clicks on a menu option.

Issue: The SidebarItems component has an onClose prop that's being passed to the RouterLink onClick handler, but in the Sidebar component, we are not passing this prop to SidebarItems. 

Fix: Now when a user clicks on any navigation item in the sidebar or the logout button, the drawer will automatically close as the new page loads. The onClose function is passed to each RouterLink in the SidebarItems component, which will trigger when a user clicks on a menu option.
@dtellz dtellz changed the title 🐛 close sidebar on user selection 🐛 Close sidebar on user selection Mar 2, 2025
@dtellz
Copy link
Contributor Author

dtellz commented Mar 2, 2025

Hi maintainers, could you please add the "bug" label to this PR? Thank you!

@alejsdev alejsdev added the bug Something isn't working label Mar 4, 2025
@alejsdev alejsdev changed the title 🐛 Close sidebar on user selection 🐛 Close sidebar drawer on user selection Mar 19, 2025
@alejsdev alejsdev merged commit 05bebff into fastapi:master Mar 19, 2025
17 of 18 checks passed
@alejsdev
Copy link
Member

Nice, thank you! @dtellz

@dtellz
Copy link
Contributor Author

dtellz commented Mar 20, 2025

Nice, thank you! @dtellz

Glad to help this awesome project :D thanks you for taking care of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants