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

SelectButton broken in v16.7.0 #14021

Closed
rosenthalj opened this issue Nov 3, 2023 · 1 comment
Closed

SelectButton broken in v16.7.0 #14021

rosenthalj opened this issue Nov 3, 2023 · 1 comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@rosenthalj
Copy link
Contributor

Describe the bug

The SelectButton doesn't work.

  • property allowEmpty is ignored
    -- empty is incorrectly always allowed
  • optionValue never updated

Listed below are two videos running the exact same code except for the version of PrimeNG. In the videos the top SelectButton has allowEmpty=false and the bottom SelectButton has allowEmpty=true.

BAD: The first video is v16.7.0 and demonstrates that the SelectButton doesn't work. Both SelectButtons show the exact same behavior and the optionValue for each SelectButton never changes.

SelectButtonPrimeNG16.7.0.mov

GOOD: The second video is v16.6.0 and demonstrates the SelectButton working properly.

SelectButtonPrimeNG16.6.0.mov

Environment

Mac and Windows

Reproducer

https://stackblitz.com/edit/uqd2gx

Angular version

16.x

PrimeNG version

16.7.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.18.1

Browser(s)

safari, chrome, firefox

Steps to reproduce the behavior

  1. Run reproducer: https://stackblitz.com/edit/uqd2gx
  2. Click select buttons
  3. Incorrect: labels "value = false" and "value1 = false" never changes
  4. Incorrect: top SelectButton allows empty

Expected behavior

  1. Labels should change
  2. When allowEmpty=true SelectButton should not allow empty "selections"
@rosenthalj rosenthalj added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 3, 2023
@rosenthalj
Copy link
Contributor Author

I started to investigate a fix, but there were too many "accessibility" changes to SelectButton.ts for me to feel comfortable modifying the code. I noticed that the "unselectable" properly was added. This may (or may not) have contributed to the bug, but the documentation is very confusing. Please see the annotated screenshot listed below.

Notification_Center

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 4, 2023
@cetincakiroglu cetincakiroglu added this to the 16.8.0 milestone Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants