Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Assignees

Comments

@weihe8892
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants