[nz-select]: nz-select-item zoomMotion animation issue
See original GitHub issueReproduction link
https://stackblitz.com/edit/angular-ksllvu
Steps to reproduce
- Open dropdown
- Select any user from search
- Close search and dropdown
- Open dropdown again
What is expected?
Selected items are rendered correctly, no error is thrown after clearing the field.
What is actually happening?
After opening the dropdown again you can see that the selected items are not showing, also clicking the clear search button throws:
ERROR TypeError: Cannot read property 'zoomMotion' of undefined
| Environment | Info |
|---|---|
| ng-zorro-antd | 9.1.2 |
| Browser | Google Chrome Version 81.0.4044.138 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:6 (1 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I found solution. Need use nz-select with *ngIf=“visible” and [(nzVisible)]=“visible” for nz-dropdown. Example https://stackblitz.com/edit/angular-ksllvu-8udr3r
I believe this also occurs when an
nz-selectis open inside a modal.Specifically, if a value was in the multi-select box at the time the modal was closed; the next time the modal is opened having the underlying
ngModeltied to the select with a blank valuethe
*ngIfworkaround also works in this scenario (though, since I had thenz-selectinside a child-component, I had to toggle the entire component’s visibility.