primeng icon indicating copy to clipboard operation
primeng copied to clipboard

TabMenu: activeItemChange duplicate invocation

Open parked-toes opened this issue 10 months ago • 3 comments

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

parked-toes avatar Apr 22 '24 09:04 parked-toes

I'm seeing the same issue with the TabMenu component. My version is:

  • Angular 17.2.0
  • primeng 17.15.0

IceBreakerG avatar May 08 '24 17:05 IceBreakerG

Same issue still present.

  • Angular 18.1.0
  • primeng 17.18.6

stevenrlp avatar Jul 29 '24 14:07 stevenrlp

I am also facing this issue

OmkarJ13 avatar Aug 22 '24 14:08 OmkarJ13

Same Issue here :

  • Angular 18.1.0
  • primeng 17.18.5

alimdi avatar Sep 10 '24 11:09 alimdi

looks like fixed on 17.18.9

alimdi avatar Sep 10 '24 11:09 alimdi

looks like fixed on 17.18.9

No, I am using 17.18.9 but it persists.

preetamjakhmola avatar Sep 10 '24 17:09 preetamjakhmola

True, it stopped and now happening again on 17.18.9. There somehow a reason that I can't figure out.

alimdi avatar Sep 10 '24 19:09 alimdi

due to that i used different way to solve it. i tried Click event.

preetamjakhmola avatar Sep 10 '24 19:09 preetamjakhmola