Skip to content
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

Closed
30 tasks done
peconomou929 opened this issue Apr 8, 2024 · 1 comment · Fixed by #6342
Closed
30 tasks done

Multiple Components: classnames not being set in unstyled mode #6329

peconomou929 opened this issue Apr 8, 2024 · 1 comment · Fixed by #6342
Assignees
Labels
Component: Unstyled Issue related to unstyled/passthrough attributes
Milestone

Comments

@peconomou929
Copy link
Contributor

peconomou929 commented Apr 8, 2024

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:

  • BlockUi
  • OverlayPanel
  • SideBar
  • ToggleButton
  • IconField
  • Dialog
  • Knob
  • FileUpload
  • Password
  • Mention
  • Chart
  • ScrollPanel
  • TabView
  • Card
  • Steps
  • BreadCrumb
  • TreeSelect
  • PanelMenu
  • TabMenu
  • CascadeSelect
  • SlideMenu
  • ConfirmPopup
  • ColorPicker
  • Slider
  • Rating
  • SelectButton
  • TieredMenu
  • Image
  • Toolbar
  • InputTextArea

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

  1. Create a tab menu as follows: <TabMenu className="my-menu" unstyled/>
  2. Observe in the rendered DOM that the root of the tab menu does NOT have the class name "my-menu."

Expected behavior

Any class names passed to a component should be appended to the default class names, even when we are in unstyled mode.

@peconomou929 peconomou929 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 8, 2024
@melloware melloware added Component: Unstyled Issue related to unstyled/passthrough attributes and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 8, 2024
@gucal gucal self-assigned this Apr 8, 2024
@gucal gucal added this to the 10.6.3 milestone Apr 8, 2024
@gucal
Copy link
Contributor

gucal commented Apr 8, 2024

Thank you for the detailed information.
We will fix it all as soon as possible and make it ready for the new version.
Best regards!

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 gucal linked a pull request Apr 9, 2024 that will close this issue
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
Labels
Component: Unstyled Issue related to unstyled/passthrough attributes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants