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: allow to set label's class name via the api #4877

Closed
dominikj111 opened this issue Sep 5, 2023 · 2 comments
Closed

Dropdown: allow to set label's class name via the api #4877

dominikj111 opened this issue Sep 5, 2023 · 2 comments
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request

Comments

@dominikj111
Copy link

Describe the feature you would like to see added

Allow to set the class of the dropdown label via the Dropdown api.

Is your feature request related to a problem?

I need to set same padding of the Dropdown component as near buttons to achieve consistent size.
So the Button component allow to pass p-1 as a className for an example and to have similar behaviour I need to provide custom css to set the dropdown label what is not really comfortable.

Describe the solution you'd like

Add the labelClassName attribute to set the label's class name currently classed as .p-dropdown-label.

Describe alternatives you have considered

Custom css style to set the dropdown label.

Additional context

No response

@dominikj111 dominikj111 added Status: Discussion Issue or pull request needs to be discussed by Core Team Type: New Feature Issue contains a new feature or new component request labels Sep 5, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 5, 2023
@dominikj111 dominikj111 changed the title Component: Dropdown Component: Dropdown - allow to set label's class name via the api Sep 5, 2023
@melloware
Copy link
Member

@dominikj111 can't you use Passthrough options to set the className? See: https://primereact.org/dropdown/#pt.wireframe

@melloware melloware changed the title Component: Dropdown - allow to set label's class name via the api Dropdown: allow to set label's class name via the api Sep 5, 2023
@dominikj111
Copy link
Author

Attribute

pt={{ input: { className: "p-2" } }}

works well, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

2 participants