question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[nz-select]: nz-select-item zoomMotion animation issue

See original GitHub issue

Reproduction link

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

Steps to reproduce

  1. Open dropdown
  2. Select any user from search
  3. Close search and dropdown
  4. 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:open
  • Created 3 years ago
  • Reactions:7
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
LEXXEIcommented, Jul 29, 2020

I found solution. Need use nz-select with *ngIf=“visible” and [(nzVisible)]=“visible” for nz-dropdown. Example https://stackblitz.com/edit/angular-ksllvu-8udr3r

0reactions
crossan007commented, Jul 5, 2022

I believe this also occurs when an nz-select is 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 ngModel tied to the select with a blank value

the *ngIf workaround also works in this scenario (though, since I had the nz-select inside a child-component, I had to toggle the entire component’s visibility.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found