You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In DaisyUI version 4.12.22, there is an issue with the Navbar or Tab Navigation component where the active item does not switch when selecting a new item. The switch only happens after the page is reloaded.
Steps to Reproduce
Install DaisyUI version 4.12.22.
Create a Navbar or Tab Navigation component.
Click on the first item (e.g., "Home").
Click on the second item (e.g., "About").
Notice that the component remains on the initial item ("Home") and does not switch to the new item ("About").
Reload the page, and only then does the active item switch.
Expected Behavior
The Navbar or Tab Navigation should immediately switch to the selected item without requiring a page reload.
Actual Behavior
The active item stays on the initial item, and only switches after reloading the page.
Environment
DaisyUI version: 4.12.22
Framework: Tailwind CSS
Browser: Chrome version 131.0.6778.205 (Official Build) (64-bit)
Operating System: Windows 11
Additional Information
This issue seems to occur when the application has been idle for a long time. It could be related to DaisyUI's internal state management or a conflict with Tailwind CSS.
Temporary Workaround
Reloading the page resolves the issue temporarily, but this is not an ideal solution.
The text was updated successfully, but these errors were encountered:
Thank you @FerdianFy13
for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I
find a solution.
In the meantime providing more details and reproduction links would be
helpful.
My friend, daisyUI is a CSS framework. CSS is for styles, not routing…
When your first item has an "active" class, clicking it is not going to magically move the class name to the next item. You should add the active class, based on your JS framework or routing library. For example if you are using a JS framework, you should compare the current path with the path of the link, then if it was same, you add the "active" class. This way framework will change the class to the next item when you click it.
What version of daisyUI are you using?
v4.12.22
Which browsers are you seeing the problem on?
Chrome
Reproduction URL
https://daisyui.com/components/dropdown/
Describe your issue
In DaisyUI version 4.12.22, there is an issue with the Navbar or Tab Navigation component where the active item does not switch when selecting a new item. The switch only happens after the page is reloaded.
Steps to Reproduce
Install DaisyUI version 4.12.22.
Create a Navbar or Tab Navigation component.
Click on the first item (e.g., "Home").
Click on the second item (e.g., "About").
Notice that the component remains on the initial item ("Home") and does not switch to the new item ("About").
Reload the page, and only then does the active item switch.
Expected Behavior
The Navbar or Tab Navigation should immediately switch to the selected item without requiring a page reload.
Actual Behavior
The active item stays on the initial item, and only switches after reloading the page.
Environment
DaisyUI version: 4.12.22
Framework: Tailwind CSS
Browser: Chrome version 131.0.6778.205 (Official Build) (64-bit)
Operating System: Windows 11
Additional Information
This issue seems to occur when the application has been idle for a long time. It could be related to DaisyUI's internal state management or a conflict with Tailwind CSS.
Temporary Workaround
Reloading the page resolves the issue temporarily, but this is not an ideal solution.
The text was updated successfully, but these errors were encountered: