primeng
primeng copied to clipboard
TabMenu: activeItemChange duplicate invocation
Describe the bug
Use stackblitz example from documentation and add logging of executions:
onActiveItemChange(event: MenuItem) {
this.activeItem = event;
console.log(`Executed ${this.i++} times` );
}
Log: When application inits: Executed 1 times
1 time click on a tab: Executed 2 times Executed 3 times Executed 4 times
Src: https://stackblitz.com/edit/air4fc?file=src%2Fapp%2Fdemo%2Ftab-menu-controlled-demo.ts,package.json
Environment
primeng-tab-menu-controlled-demo
Reproducer
No response
Angular version
17.3.1
PrimeNG version
17.14.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18
Browser(s)
chrome
Steps to reproduce the behavior
No response
Expected behavior
No initial and duplicate firing
I'm seeing the same issue with the TabMenu component. My version is:
- Angular 17.2.0
- primeng 17.15.0
Same issue still present.
- Angular 18.1.0
- primeng 17.18.6
I am also facing this issue
Same Issue here :
- Angular 18.1.0
- primeng 17.18.5
looks like fixed on 17.18.9
looks like fixed on 17.18.9
No, I am using 17.18.9 but it persists.
True, it stopped and now happening again on 17.18.9. There somehow a reason that I can't figure out.
due to that i used different way to solve it. i tried Click event.