Skip to content

Commit 701949d

Browse files
MKirovaMKirova
authored andcommitted
fix(igxHierarchicalGrid): stopPropagation on expander click.
1 parent 8f716a4 commit 701949d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-row.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div (click)="toggle()" class="igx-grid__hierarchical-expander" [tabIndex]="tabindex" *ngIf="hasChildren" #expander>
1+
<div (click)="expanderClick($event)" class="igx-grid__hierarchical-expander" [tabIndex]="tabindex" *ngIf="hasChildren" #expander>
22
<ng-container *ngTemplateOutlet="iconTemplate; context: { $implicit: this }">
33
</ng-container>
44
</div>

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-row.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,21 @@ export class IgxHierarchicalRowComponent extends IgxRowComponent<IgxHierarchical
8282
return this.grid && this.grid.highlightedRowID === this.rowID;
8383
}
8484

85+
/**
86+
* @hidden
87+
*/
88+
protected expanderClick(event) {
89+
event.stopPropagation();
90+
this.toggle();
91+
}
92+
8593
/**
8694
* Toggles the hierarchical row.
8795
* ```typescript
8896
* this.grid1.rowList.first.toggle()
8997
* ```
9098
*/
91-
public toggle(event?) {
99+
public toggle() {
92100
if (this.added) {
93101
return;
94102
}

0 commit comments

Comments
 (0)