Hi Vin,
Thanks for your update.
You can use selecting event to check whether the event is triggered by clicking on the tab header using event argument. Please refer to the following code example and sample.
<ejs-tab
#tab
id="tab_default"
heightAdjustMode="Auto"
(selected)="clickTabs($event)"
(selecting)="select($event)"
>
public clickTabs(e: SelectEventArgs) {
if (this.isClicked) {
// Your code
this.isClicked = false;
console.log('tab selected through header');
}
}
public select(e: SelectingEventArgs) {
if (!isNullOrUndefined(e.event) && !isNullOrUndefined(e.event.target)) {
this.isClicked = true;
}
}
In the above sample, the message will print in console only when we select tab using header. It will not print on selecting tab by clicking on the button.
Please try the solution and let us know if you need any further assistance.
Regards,
Nevitha