You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nz-select with ngModel to initialize the selected value, the dropdown does not automatically scroll to the selected item if a scrollbar is present.
#8520
Open
weihe8892 opened this issue
Apr 22, 2024
· 0 comments
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
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: