-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
TabView: onTabChange + activeIndex styling issues with unstyled mode + Tailwind. #7043
Comments
@eklee by design see the Controlled demo: https://primereact.org/tabview/#controlled Once you start using |
@melloware - it does look like onTabChange + activeIndex works on styled template. But it seems to be partially working on unstyled + Tailwind. With unstyled + Tailwind, clicking on tabs do change the tab content, but the active tab highlight does not change. I have created another fork here: https://stackblitz.com/edit/q1g8yj-xluy87 and updated the bug description. An example is this: the content is showing language, but the tab highlight is stuck on Theme. |
Ok if it's tailwind related is it this issue: #6868 |
Hey, I can see it's closed, and perhaps I should open a new issue. But I'm using unstyled + tailwind as well, and encounter the same issue. After upgrading to 10.8.3 the tabs crash: TypeError: Cannot read properties of undefined (reading 'state') at headerAction (index.esm.js:297:213) When I change te be resilient against undefined, the tab UI does not reflect active state
The reproduction for me is as easy as this, it will crash immediatly.
|
I'll make a proper bug later today |
Describe the bug
Tabview controlled mode partially works with unstyled + Tailwind styling. Clicking on tabs will change the tab panel content, but the active highlight seems to be stuck on the initial state of activeIndex.
Reproducer
https://stackblitz.com/edit/q1g8yj-xluy87
System Information
PrimeReact version
10.8.2
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome 127
Steps to reproduce the behavior
Goto this Stackblitz project - https://stackblitz.com/edit/q1g8yj-xluy87 - click on the Theme and Language tabs, notice the tab content changes, but the tab itself always have active highlight on the first tab, even after you click on the 2nd tab.
Expected behavior
Adding onTabChange callback handler should not stop tab switching from working
The text was updated successfully, but these errors were encountered: