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

Add className support to SelectButtonItems #1019

Closed
mann-david opened this issue Sep 23, 2019 · 1 comment
Closed

Add className support to SelectButtonItems #1019

mann-david opened this issue Sep 23, 2019 · 1 comment
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@mann-david
Copy link

mann-david commented Sep 23, 2019

I'm submitting a ... (check one with "x")

[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Current behavior
SelectButton does not use className from SelectItem API. Looking at the code, either this line

<div ref={(el) => this.el = el} className={className} onClick={this.onClick}>
or this line
<span className="p-button-text p-c">{this.props.label}</span>

should pull the className from the object defining the item. Neither does.

Expected behavior
CSS class specified via the SelectItem API should be applied

  • React version:
    16.8.6

  • PrimeReact version:
    Running 3.1.3, but checked source in Github for 3.2.1

@mertsincan mertsincan changed the title className not applied for SelectButton Add className support to SelectButtonItems Oct 14, 2019
@mertsincan mertsincan self-assigned this Oct 14, 2019
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Oct 14, 2019
@mertsincan mertsincan added this to the 3.2.1 milestone Oct 14, 2019
@mertsincan
Copy link
Member

Please try;

...
  {label: 'Apartment', value: 'Apartment', className: 'p-option-apartment'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants