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

Dropdown: props.panelStyle is never used #6854

Closed
homer0 opened this issue Jul 9, 2024 · 2 comments · Fixed by #6856, leoo1992/GeradorQRCode#80 or leoo1992/GeradorQRCode#85 · May be fixed by mtech-31-quemistry/quemistry_client_web#20
Closed
Assignees
Labels
Component: Unstyled Issue related to unstyled/passthrough attributes
Milestone

Comments

@homer0
Copy link

homer0 commented Jul 9, 2024

Describe the bug

After noticing that my styles were not being applied, I checked the code and found this:

https://github.com/primefaces/primereact/blob/master/components/lib/dropdown/DropdownBase.js#L153-L155

const inlineStyles = {
    wrapper: ({ props }) => ({ maxHeight: props.scrollHeight || 'auto' }),
    panel: ({ props }) => {
        props.panelStyle;
    }
};

That problem is on the panel property. It's either missing a return or it has unnecessary brackets.

Reproducer

No response

PrimeReact version

10.6.6

React version

17.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

Edge latest

Steps to reproduce the behavior

<Dropdown
  options={[]}
  optionLabel="name"
  optionValue="id"
  panelStyle={{
    backgroundColor: 'red',
  }}
/>

Expected behavior

The panel would have the background color set to red

@homer0 homer0 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 9, 2024
Rekl0w added a commit to Rekl0w/primereact that referenced this issue Jul 9, 2024
@Rekl0w
Copy link
Contributor

Rekl0w commented Jul 9, 2024

PR submitted.

@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 Jul 9, 2024
@melloware melloware added this to the 10.7.1 milestone Jul 9, 2024
@homer0
Copy link
Author

homer0 commented Jul 9, 2024

@Rekl0w thanks 🤘!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment