NG-ZORRO / ng-zorro-antd

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

nz-dropdown doesn't update nzVisible property with onPush change detection strategy #7875

Open raizemm opened 1 year ago

raizemm commented 1 year ago

Reproduction link

https://stackblitz.com/edit/angular-nyb7pp

Steps to reproduce

Open the dropdown Notice the nzVisible value is correctly updated from false to true on the template Close the dropdown nzVisible property remains true

What is expected?

nzVisible property is updated properly with onPush change detection strategy

What is actually happening?

nzVisible property remains true after closing the dropdown

Environment Info
ng-zorro-antd 15.0.2
Browser Chrome 111.0.5563.65
volvachev commented 1 year ago

Hi, this is the correct behavior for angular when there is an onPushStrategy. You can change the code to the following example