ng-zorro-antd icon indicating copy to clipboard operation
ng-zorro-antd copied to clipboard

Please add close method on nz-select like in nz-dropdown

Open BohdanChernivtsi opened this issue 5 years ago • 3 comments

What problem does this feature solve?

Currently if we want to close nz-select programmatically we need to use this.nzSelectComponent.nzOpen = false; Having close method in API, like in nz-dropdown would be great

What does the proposed API look like?

close(): void { this.nzSelectComponent.nzOpen = false; }

BohdanChernivtsi avatar Sep 11 '20 08:09 BohdanChernivtsi

我也想要关闭方法。 目前通过nzOpenChange获取返回值,为false的时候调用this.nzSelectComponent.blur(); 踩了个坑...

SeLiNnnn avatar Sep 30 '20 09:09 SeLiNnnn

I am using two-way binding, like this:

<nz-select [(nzOpen)]="isOpenSelect">...</nz-select>

close(): void {
    this.isOpenSelect = false;
}

kenttanl avatar Nov 14 '20 01:11 kenttanl

I am using two-way binding, like this:

<nz-select [(nzOpen)]="isOpenSelect">...</nz-select>

close(): void {
    this.isOpenSelect = false;
}

It works for me. Thanks!

kungfuboy avatar Jul 28 '22 07:07 kungfuboy