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

CascadeSelect: onChange event fires unexpectedly on component initialization #17525

Open
4 tasks
itismohammadreza opened this issue Jan 29, 2025 · 0 comments
Open
4 tasks
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@itismohammadreza
Copy link
Contributor

Describe the bug

The onChange output event is firing automatically when the component initializes, instead of only triggering when a user interaction occurs

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

No response

Reproducer

https://stackblitz.com/edit/mjbmhva7?file=src%2Fapp%2Fimports.ts,src%2Fapp%2Fcascade-select-invalid-demo.html,src%2Fapp%2Fcascade-select-invalid-demo.ts

Environment

windows

Angular version

19

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. Add the component with an onChange handler.
  2. Observe that the handler executes immediately on load, without any user interaction.

Expected behavior

The onChange event should only fire when the value actually changes due to user input.

@itismohammadreza itismohammadreza 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 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant