From 7ca0a5201dbf0dc34e1927f14f2b63e7f3970747 Mon Sep 17 00:00:00 2001 From: Wendell Date: Sun, 25 Aug 2019 18:03:45 +0800 Subject: [PATCH] fix(module:tabs): fix tabs still shows when no route is matched (#4034) --- components/tabs/nz-tabset.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/tabs/nz-tabset.component.ts b/components/tabs/nz-tabset.component.ts index a845346dffa..07431d0b637 100644 --- a/components/tabs/nz-tabset.component.ts +++ b/components/tabs/nz-tabset.component.ts @@ -323,10 +323,11 @@ export class NzTabSetComponent private updateRouterActive(): void { if (this.router.navigated) { const index = this.findShouldActiveTabIndex(); - if (index !== this._selectedIndex && index !== -1) { + if (index !== this._selectedIndex) { this.nzSelectedIndex = index; this.nzSelectedIndexChange.next(index); } + this.nzHideAll = index === -1; } }