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

Panel: Missing props.className passthrough #5087

Closed
dvpritzbuer opened this issue Oct 12, 2023 · 1 comment
Closed

Panel: Missing props.className passthrough #5087

dvpritzbuer opened this issue Oct 12, 2023 · 1 comment
Assignees
Labels
Core Team Issue or pull request has been *opened* by a member of Core Team Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@dvpritzbuer
Copy link
Contributor

dvpritzbuer commented Oct 12, 2023

Describe the bug

Currently the Panel component doesn't passthrough the props.className value.

So within the Panel.js the line 247:
className: cx('root')

has to be something like:
className: classNames(props.className, cx('root')),

EDIT
Just had a further look and it seems I missunderstood the code and thought my proposed solution which is taken from Button.js is required, but for example the panel content also only has className: cx('content') which in this case does apply the custom classes set within a passthrough object. So I'm confused when to use the passthrough like the button does and when the cx() is enough, but the Panel component doesn't apply the custom classes which needs to be fixed.

Reproducer

https://codesandbox.io/s/primereact-test-forked-tdzs9g

PrimeReact version

10.0.3

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

<Panel className="test" />

Expected behavior

Panel dom with added className's

@dvpritzbuer dvpritzbuer added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 12, 2023
@habubey habubey self-assigned this Oct 12, 2023
@habubey habubey added Core Team Issue or pull request has been *opened* by a member of Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 12, 2023
@habubey
Copy link
Contributor

habubey commented Oct 12, 2023

Thanks for your report, it will be a fix in the new version.

@melloware melloware added this to the 10.0.4 milestone Oct 12, 2023
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Team Issue or pull request has been *opened* by a member of Core Team Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

4 participants