Skip to content

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

@tantampimputs-gif
Copy link

c49bf29

Pagi66 pushed a commit to Pagi66/full-stack-fastapi-template that referenced this pull request Sep 8, 2025
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.

3 participants