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

Error: Cannot read properties of undefined (reading 'nzValue') when pressed arrows on an empty NzSelect #7018

Open Bonelol opened 3 years ago

Bonelol commented 3 years ago

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-ivy-kapl5j

Steps to reproduce

Click select to open drop down, then press any arrow key. Open DevTools, check error messages

What is expected?

No error pops up, this should be handled by NgZorro itself

What is actually happening?

Cannot read properties of undefined (reading 'nzValue') at NzSelectComponent.onKeyDown

Environment Info
ng-zorro-antd 12.0.1
Browser Chrome, Edge
Bonelol commented 3 years ago

I had created a pull request for this