diff --git a/components/core/tree/nz-tree-base.service.ts b/components/core/tree/nz-tree-base.service.ts index 27dec85f11a..f25a8d09c51 100644 --- a/components/core/tree/nz-tree-base.service.ts +++ b/components/core/tree/nz-tree-base.service.ts @@ -374,6 +374,7 @@ export class NzTreeBaseService implements OnDestroy { } else { n.isMatched = false; } + n.canHide = !n.isMatched; n.children.forEach(child => { searchChild(child); });