Skip to content

Commit a474a02

Browse files
committed
fix(combo): combo click selection, #6015
1 parent 368e296 commit a474a02

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

projects/igniteui-angular/src/lib/combo/combo-add-item.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IgxComboItemComponent } from './combo-item.component';
2-
import { Component } from '@angular/core';
2+
import { Component, HostListener } from '@angular/core';
33

44
/**
55
* @hidden
@@ -16,8 +16,12 @@ export class IgxComboAddItemComponent extends IgxComboItemComponent {
1616
set selected(value: boolean) {
1717
}
1818

19-
clicked(event?) {
19+
@HostListener('click')
20+
handleClick() {
2021
this.comboAPI.disableTransitions = false;
2122
this.comboAPI.add_custom_item();
2223
}
24+
25+
clicked(event?) {
26+
}
2327
}

projects/igniteui-angular/src/lib/combo/combo-item.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import {
44
HostBinding,
55
Inject,
66
Input,
7-
DoCheck,
8-
HostListener
7+
DoCheck
98
} from '@angular/core';
109
import { IgxDropDownItemComponent } from '../drop-down/drop-down-item.component';
1110
import { IGX_DROPDOWN_BASE, IDropDownBase, Navigate } from '../drop-down/drop-down.common';
@@ -85,7 +84,6 @@ export class IgxComboItemComponent extends IgxDropDownItemComponent implements D
8584
return rect.y >= parentDiv.y;
8685
}
8786

88-
@HostListener('click', ['$event'])
8987
clicked(event) {
9088
this.comboAPI.disableTransitions = false;
9189
if (this.disabled || this.isHeader) {

projects/igniteui-angular/src/lib/drop-down/drop-down-item.base.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,6 @@ export class IgxDropDownItemBaseDirective implements DoCheck {
317317
@Optional() @Inject(IgxSelectionAPIService) protected selection?: IgxSelectionAPIService
318318
) { }
319319

320-
/**
321-
* @hidden @internal
322-
*/
323-
@HostListener('click', ['$event'])
324-
clicked(event) {
325-
}
326-
327320
ngDoCheck(): void {
328321
if (this._selected) {
329322
const dropDownSelectedItem = this.dropDown.selectedItem;

0 commit comments

Comments
 (0)