themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.78k stars 396 forks source link

fix(navbar): on Mobile Screen Navbar remains open even page is changed #1247

Closed dhavalveera closed 5 months ago

dhavalveera commented 5 months ago

When we go to the Mobile Screen and when we click on Navbar, it opens the Collapse, and when we click on any of the Link and it get redirected to another page, but Navbar Collapse isn't getting closed, it was only getting closed from Navbar Toggle nowhere else.

This fix is adding the onClick event to NavbarCollapse so whenever we click on the Link, it is closing the navbar.

Current: image

Fixed: image

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2024 11:32am
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (7461173) 99.54% compared to head (5ea5f12) 97.35%. Report is 194 commits behind head on main.

:exclamation: Current head 5ea5f12 differs from pull request most recent head cb6cfc4. Consider uploading reports for the commit cb6cfc4 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1247 +/- ## ========================================== - Coverage 99.54% 97.35% -2.20% ========================================== Files 163 216 +53 Lines 6621 9224 +2603 Branches 401 538 +137 ========================================== + Hits 6591 8980 +2389 - Misses 30 244 +214 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dhavalveera commented 5 months ago

what is LGTM @nigellima ?

nigellima commented 5 months ago

what is LGTM @nigellima ?

Looks Good To Me 😄

dhavalveera commented 5 months ago

what is LGTM @nigellima ?

Looks Good To Me 😄

Understood!.. can you please approve the review again, please @nigellima

dhavalveera commented 5 months ago

@SutuSebastian can you please review the PR, and approve?

dhavalveera commented 5 months ago

@SutuSebastian , can you please help regarding the CI / build (pull_request) is getting failed now..

SutuSebastian commented 5 months ago

@SutuSebastian , can you please help regarding the CI / build (pull_request) is getting failed now..

its just codecov going nuts again...

dhavalveera commented 5 months ago

@SutuSebastian , can you please help regarding the CI / build (pull_request) is getting failed now..

its just codecov going nuts again...

Understood!.. I don't have to worry about it, right sir @SutuSebastian ?

so I guess this PR had to be merge manually, if I am not wrong due to this check fail due to Codecov

SutuSebastian commented 5 months ago

@SutuSebastian , can you please help regarding the CI / build (pull_request) is getting failed now..

its just codecov going nuts again...

Understood!.. I don't have to worry about it, right sir @SutuSebastian ?

so I guess this PR had to be merge manually, if I am not wrong due to this check fail due to Codecov

no, nothing from ur side, i'll merge it anyway, small changes