-
Notifications
You must be signed in to change notification settings - Fork 956
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
Multiple Components: classnames not being set in unstyled mode #6329
Labels
Component: Unstyled
Issue related to unstyled/passthrough attributes
Milestone
Comments
Thank you for the detailed information. |
gucal
added a commit
to gucal/primereact
that referenced
this issue
Apr 9, 2024
gucal
added a commit
to gucal/primereact
that referenced
this issue
Apr 9, 2024
gucal
added a commit
to gucal/primereact
that referenced
this issue
Apr 9, 2024
gucal
added a commit
to gucal/primereact
that referenced
this issue
Apr 9, 2024
gucal
added a commit
to gucal/primereact
that referenced
this issue
Apr 9, 2024
gucal
added a commit
that referenced
this issue
Apr 9, 2024
#6329 classnames not being set in unstyled mode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
This bug applies to many different components (listed below). The issue is that, when in
unstyled
mode, any class names given to the component are not propagated properly. For example, if I have<TabMenu className="my-menu" unstyled/>
then, upon inspecting the DOM, you will see that the root of the tab menu does NOT have the class name "my-menu."This issue has already been raised for the InputText component. However, it is much more widespread than this. I have not physically tested it for different components, but, upon inspecting the code (grepping for the string
className: cx('root'
), I suspect it is an issue for the components listed below. The solution for these components should be the same as for the InputText, which can be found in the this PR.Components Affected:
Reproducer
No response
PrimeReact version
10.6.2
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
<TabMenu className="my-menu" unstyled/>
Expected behavior
Any class names passed to a component should be appended to the default class names, even when we are in
unstyled
mode.The text was updated successfully, but these errors were encountered: