ng-zorro-antd
ng-zorro-antd copied to clipboard
nz-select with ngModel to initialize the selected value, the dropdown does not automatically scroll to the selected item if a scrollbar is present.
Reproduction link
https://stackblitz.com/edit/angular-qmhd2b?file=src%2Fapp%2Fapp.component.ts
Steps to reproduce
I have nz-select with dropdown options containing 12 items. I am using ngModel to bind the selectedValue to "tom-10", which is located at the bottom of the list. When I open the dropdown, I expect it to automatically display "tom-10" as the highlighted selection in blue. However, the dropdown opens showing only the top of the list, and I must manually scroll down to see "tom-10". I would expect that "tom-10" is visible automatically when the dropdown opens.
What is expected?
I would expect that selectedValue is visible automatically when the dropdown opens.
What is actually happening?
The dropdown opens showing only the top of the list, I have to manually scroll down to make selectedValue visible.
Environment | Info |
---|---|
ng-zorro-antd | 17.4.0 |
Browser | chrome and edge |