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

Component: disabled Select placeholder has disabled value color Style (v18.0.0) #17161

Open
honboubao opened this issue Dec 20, 2024 · 2 comments
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@honboubao
Copy link
Contributor

Describe the bug

A disabled Select component applies the text color for disabled values to the placeholder.

This happens because

.p-select.p-disabled .p-select-label {
    color: ${dt('select.disabled.color')};
}

in selectstyle.ts:98

takes precedence over

.p-select-label.p-placeholder {
    color: ${dt('select.placeholder.color')};
}

in selectstyle.ts:86

This isn't noticable with the default theme, as both select.placeholder.color and select.disabled.color are set to surface.500. But in my customized theme, where those differ, I can't tell, if a disabled select has a value selected or not.

Environment

Windows 10
Firefox 128.3.1esr

Reproducer

https://stackblitz.com/edit/stackblitz-starters-recoyrma?file=src%2Fapp%2Fapp.component.html

Angular version

18

PrimeNG version

18

Node version (for AoT issues node --version)

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. customize the theme's select.disabled.color and select.placeholder.color variables and set to differing colors
  2. add disabled select component with placeholder and no value selected
  3. placeholder text does not have the configured placeholder color as would be expected

Expected behavior

I think the placeholder should have select.placeholder.color applied, whether the component is enabled or disabled.

@honboubao honboubao added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 20, 2024
@mertsincan mertsincan added this to the 19.x milestone Dec 25, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 25, 2024
@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by 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 Dec 25, 2024
@mertsincan mertsincan modified the milestones: 19.x, 19.0.2 Dec 25, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 19.0.2, 19.0.4 Dec 26, 2024
@honboubao
Copy link
Contributor Author

Same behaviour can be observed with CascadeSelect and TreeSelect as well

@honboubao
Copy link
Contributor Author

...and also MultiSelect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Review
Development

No branches or pull requests

3 participants