diff --git a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid-base.component.ts b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid-base.component.ts index 926e07ad819..30b5bddb3b3 100644 --- a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid-base.component.ts +++ b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid-base.component.ts @@ -1,6 +1,4 @@ import { - QueryList, - ContentChildren, ElementRef, NgZone, ChangeDetectorRef, @@ -11,7 +9,8 @@ import { Optional, Input, ViewChild, - TemplateRef + TemplateRef, + ContentChild } from '@angular/core'; import { IgxGridBaseComponent, IgxGridTransaction, IGridDataBindable } from '../grid-base.component'; import { GridBaseAPIService } from '../api.service'; @@ -28,6 +27,8 @@ import { IgxHierarchicalGridNavigationService } from './hierarchical-grid-naviga import { IgxGridSummaryService } from '../summaries/grid-summary.service'; import { IgxGridSelectionService, IgxGridCRUDService } from '../../core/grid-selection'; import { IgxChildGridRowComponent } from './child-grid-row.component'; +import { IgxRowSelectorDirective, IgxHeadSelectorDirective } from '../igx-selection.module'; +import { IgxCheckboxComponent } from '../../checkbox/checkbox.component'; export const IgxHierarchicalTransactionServiceFactory = { provide: IgxGridTransaction, @@ -149,6 +150,12 @@ export abstract class IgxHierarchicalGridBaseComponent extends IgxGridBaseCompon */ public dragIndicatorIconTemplate: TemplateRef = null; + @ContentChild(IgxRowSelectorDirective, { read: TemplateRef, static: true }) + public rowSelectorTemplate: TemplateRef; + + @ContentChild(IgxHeadSelectorDirective, { read: TemplateRef, static: true }) + public headSelectorTemplate: TemplateRef; + /** * @hidden */ diff --git a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html index b63feb05635..b98515a340a 100644 --- a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html +++ b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html @@ -30,12 +30,15 @@ - -
+
- + +
@@ -87,7 +90,7 @@ - + @@ -203,5 +206,14 @@ drag_indicator + + + + +
diff --git a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.integration.spec.ts b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.integration.spec.ts index 2cb15975eaa..5a1218fece3 100644 --- a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.integration.spec.ts +++ b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.integration.spec.ts @@ -484,7 +484,7 @@ describe('IgxHierarchicalGrid Integration', () => { fixture.detectChanges(); const rootExpander = (hierarchicalGrid.dataRowList.toArray()[0] as IgxHierarchicalRowComponent).expander; - const rootCheckbox = hierarchicalGrid.headerCheckboxContainer; + const rootCheckbox = hierarchicalGrid.headerSelectorContainer; const rootSummaryRow = hierarchicalGrid.summariesRowList.first.nativeElement; const rootSummaryIndentation = rootSummaryRow.querySelector(SUMMARIES_MARGIN_CLASS); diff --git a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-row.component.html b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-row.component.html index 0b8de977d82..60a19052940 100644 --- a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-row.component.html +++ b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-row.component.html @@ -8,9 +8,12 @@
-
- -
+
+ + +
@@ -54,3 +57,12 @@ + + + + \ No newline at end of file