NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.86k stars 3.91k forks source link

Selected sub menu isn't highlighted when collapsed #3345

Closed andrew-yangy closed 5 years ago

andrew-yangy commented 5 years ago

Reproduction link

https://stackblitz.com/edit/angular-anbpkt?file=src/app/app.component.ts

Steps to reproduce

Collapse the menu and set submenu to open

What is expected?

The selected sub menu should be highlighted by the class ant-menu-submenu-selected.

What is actually happening?

The selected sub menu is not highlighted when first loaded.

Environment Info
ng-zorro-antd 7.3.2
Browser Latest Chrome

It might be because of this line https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/menu/nz-submenu.component.ts#L197

anhtt-asiantech commented 2 years ago

can you see: Thu thuat