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

Checkbox and radio invalid styles are not applied correctly #17303

Open
2 of 4 tasks
vindow opened this issue Jan 6, 2025 · 0 comments
Open
2 of 4 tasks

Checkbox and radio invalid styles are not applied correctly #17303

vindow opened this issue Jan 6, 2025 · 0 comments
Assignees
Labels
Component: Theme Issue or pull request is related to Theme Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@vindow
Copy link

vindow commented Jan 6, 2025

Describe the bug

Angular gives the p-checkbox and p-radiobutton elements the class ng-invalid and ng-dirty but the css selector seems to be assuming it for styleClass instead. Therefore when the form control is invalid and dirty it never gets a red border. The example on the radiobutton page for invalid also doesn't match the actual demo(ng-invalid ng-dirty is applied on class in the code example but applied on styleClass in the demo) but it does match correctly for the checkbox.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

Not sure where to fix the examples.

Reproducer

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

Environment

I'm using Angular 18.2.13 and PrimeNg 18.0.2 but it still seems to be an issue on Primeng 19 as well.

Angular version

18.2.13

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

In the stackblitz example the radio buttons and checkbox are already invalid. Press the button to mark them dirty and they won't be bordered in red.

Expected behavior

The border of the radio buttons and checkbox should be red when the controls are marked as dirty.

@vindow vindow added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 6, 2025
@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team Component: Theme Issue or pull request is related to Theme and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 16, 2025
@mertsincan mertsincan added this to the 19.1.0 milestone Jan 16, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Jan 16, 2025
@mertsincan mertsincan moved this from Review to Theme in PrimeNG Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Theme Issue or pull request is related to Theme Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Theme
Development

No branches or pull requests

3 participants