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 p-listbox triggers onChange multiple times #15873

Closed
FloreaAndrei22 opened this issue Jun 21, 2024 · 0 comments · Fixed by #15900
Closed

Component p-listbox triggers onChange multiple times #15873

FloreaAndrei22 opened this issue Jun 21, 2024 · 0 comments · Fixed by #15900
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@FloreaAndrei22
Copy link

Describe the bug

The onChange event emitter is triggered two times when all items are selected.

Selecting a single entry is fine, but when the select all button is clicked, the trigger is duplicated

Environment

"dependencies": {
"@angular-devkit/core": "~17.3.8",
"@angular/animations": "^17.3.10",
"@angular/cdk": "^17.3.10",
"@angular/common": "^17.3.10",
"@angular/compiler": "^17.3.10",
"@angular/core": "^17.3.10",
"@angular/forms": "^17.3.10",
"@angular/platform-browser": "^17.3.10",
"@angular/platform-browser-dynamic": "^17.3.10",
"@angular/router": "^17.3.10",
"@fortawesome/fontawesome-pro": "6.3.0",
"@ng-idle/core": "^14.0.0",
"@stomp/rx-stomp": "^2.0.0",
"@stomp/stompjs": "^7.0.0",
"chart.js": "^4.4.3",
"hammerjs": "^2.0.8",
"karma-coverage": "^2.2.1",
"lodash-es": "^4.17.21",
"moment": "^2.30.1",
"pixi.js": "^7.4.2",
"primeflex": "^3.3.1",
"primeicons": "^7.0.0",
"primeng": "^17.18.1",
"quill": "~1.3.7",
"rxjs": "^7.8.1",
"simplify-js": "^1.2.4",
"ts-gaussian": "^3.0.4",
"tslib": "^2.6.2",
"zone.js": "~0.14.6"
},

Reproducer

https://stackblitz.com/edit/github-krbnal?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.spec.ts

Angular version

17.3.10

PrimeNG version

17.18.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.14.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@FloreaAndrei22 FloreaAndrei22 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 21, 2024
@FloreaAndrei22 FloreaAndrei22 changed the title Component: p-listbox Component: p-listbox triggers onChange multiple times Jun 21, 2024
@FloreaAndrei22 FloreaAndrei22 changed the title Component: p-listbox triggers onChange multiple times Component p-listbox triggers onChange multiple times Jun 21, 2024
@mehmetcetin01140 mehmetcetin01140 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 Jun 25, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Jun 25, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.18.2 milestone Jun 25, 2024
cetincakiroglu added a commit that referenced this issue Jun 27, 2024
Fixed #15873 - Listbox | p-listbox triggers onChange multiple times
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

Successfully merging a pull request may close this issue.

2 participants