Skip to content

Commit

Permalink
fix(module:tabs): not emit click event from dropdown menu (#5639)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed Aug 3, 2020
1 parent 2ede777 commit 201ef52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/tabs/tab-nav-operation.component.ts
Expand Up @@ -82,6 +82,8 @@ export class NzTabNavOperationComponent implements OnDestroy {

onSelect(item: NzTabNavItemDirective): void {
if (!item.disabled) {
// ignore nzCanDeactivate
item.tab.nzClick.emit();
this.selected.emit(item);
}
}
Expand Down
1 change: 1 addition & 0 deletions components/tabs/tabset.component.ts
Expand Up @@ -389,6 +389,7 @@ export class NzTabSetComponent implements OnInit, AfterContentChecked, OnDestroy

clickNavItem(tab: NzTabComponent, index: number): void {
if (!tab.nzDisabled) {
// ignore nzCanDeactivate
tab.nzClick.emit();
this.setSelectedIndex(index);
}
Expand Down

0 comments on commit 201ef52

Please sign in to comment.