diff --git a/components/select/select-top-control.component.ts b/components/select/select-top-control.component.ts index 892a84dd01b..46974aba649 100644 --- a/components/select/select-top-control.component.ts +++ b/components/select/select-top-control.component.ts @@ -57,16 +57,6 @@ import { NzSelectItemInterface, NzSelectModeType, NzSelectTopControlItemType } f - + `, host: { '[class.ant-select-selector]': 'true', - '(click)': 'onHostClick()', '(keydown)': 'onHostKeydown($event)' } }) @@ -108,7 +107,6 @@ export class NzSelectTopControlComponent implements OnChanges { @Output() readonly inputValueChange = new EventEmitter(); @Output() readonly animationEnd = new EventEmitter(); @Output() readonly deleteItem = new EventEmitter(); - @Output() readonly openChange = new EventEmitter(); @ViewChild(NzSelectSearchComponent) nzSelectSearchComponent!: NzSelectSearchComponent; listOfSlicedItem: NzSelectTopControlItemType[] = []; isShowPlaceholder = true; @@ -116,16 +114,6 @@ export class NzSelectTopControlComponent implements OnChanges { isComposing = false; inputValue: string | null = null; - onHostClick(): void { - if (this.open && this.showSearch) { - return; - } - - if (!this.disabled) { - this.openChange.next(!this.open); - } - } - onHostKeydown(e: KeyboardEvent): void { const inputValue = (e.target as HTMLInputElement).value; if (e.keyCode === BACKSPACE && this.mode !== 'default' && !inputValue && this.listOfTopItem.length > 0) { diff --git a/components/select/select.component.ts b/components/select/select.component.ts index cfbece51342..0e7a3cf89c6 100644 --- a/components/select/select.component.ts +++ b/components/select/select.component.ts @@ -92,7 +92,6 @@ export type NzSelectSizeType = 'large' | 'default' | 'small'; (animationEnd)="updateCdkConnectedOverlayPositions()" (deleteItem)="onItemDelete($event)" (keydown)="onKeyDown($event)" - (openChange)="setOpenState($event)" > !item.nzHide)