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] select option is not active after dynamically changing select source on (nzOnSearch) #4279

Closed
tky753 opened this issue Oct 11, 2019 · 1 comment
Assignees

Comments

@tky753
Copy link

tky753 commented Oct 11, 2019

Reproduction link

https://stackblitz.com/edit/nz-table-dynamic-active?file=src/app/app.component.ts

Steps to reproduce

  1. copy "shen" to static nz-select
  2. copy "shen" to dynamic nz-select
    image

What is expected?

select option "shenzhen" is active for both compoments.

What is actually happening?

select option "shenzhen" is active for static nz-select,
but select option "shenzhen" is not active for dynamic nz-select.

Environment Info
ng-zorro-antd 8.3.1
Browser Chrome 76.0.3809.132(正式版本) (64 位)

After copying value to nz-select compoment, I have to tap down arrow to active the select option even if there is only one option.

@wenqi73
Copy link
Member

wenqi73 commented Jan 7, 2020

  constructor(private cdr: ChangeDetectorRef) {}
  onSearch(val: string) {
    // ...
    this.cdr.detectChanges();
  }

@wenqi73 wenqi73 closed this as completed Jan 7, 2020
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

3 participants