Skip to content

Commit 83302ad

Browse files
authored
Merge pull request #4886 from IgniteUI/PMiteva/fix-drag-indicator-tmp
Add ContentChild decorator to DragIndicatorIconTemplate
2 parents c8058c3 + 39a2bea commit 83302ad

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -127,26 +127,6 @@ export abstract class IgxHierarchicalGridBaseComponent extends IgxGridBaseCompon
127127
this.hgridAPI = <IgxHierarchicalGridAPIService>gridAPI;
128128
}
129129

130-
/**
131-
* The custom template, if any, that should be used when rendering the row drag indicator icon
132-
*
133-
* ```typescript
134-
* // Set in typescript
135-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
136-
* myComponent.dragIndicatorIconTemplate = myCustomTemplate;
137-
* ```
138-
* ```html
139-
* <!-- Set in markup -->
140-
* <igx-grid #grid>
141-
* ...
142-
* <ng-template igxDragIndicatorIcon>
143-
* <igx-icon fontSet="material">info</igx-icon>
144-
* </ng-template>
145-
* </igx-grid>
146-
* ```
147-
*/
148-
public dragIndicatorIconTemplate: TemplateRef<any> = null;
149-
150130
/**
151131
* @hidden
152132
*/

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import {
2020
AfterContentInit,
2121
Optional,
2222
OnInit,
23-
OnDestroy
23+
OnDestroy,
24+
ContentChild
2425
} from '@angular/core';
2526
import { IgxGridBaseComponent, IgxGridTransaction } from '../grid-base.component';
2627
import { GridBaseAPIService } from '../api.service';
@@ -41,6 +42,7 @@ import { IgxGridSelectionService, IgxGridCRUDService } from '../../core/grid-sel
4142
import { IgxOverlayService } from '../../services/index';
4243
import { IgxColumnResizingService } from '../grid-column-resizing.service';
4344
import { IgxForOfSyncService } from '../../directives/for-of/for_of.sync.service';
45+
import { IgxDragIndicatorIconDirective } from '../row-drag.directive';
4446

4547
let NEXT_ID = 0;
4648

@@ -233,6 +235,27 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseCompone
233235
@ContentChildren(IgxRowIslandComponent, { read: IgxRowIslandComponent, descendants: true })
234236
public allLayoutList: QueryList<IgxRowIslandComponent>;
235237

238+
/**
239+
* The custom template, if any, that should be used when rendering the row drag indicator icon
240+
*
241+
* ```typescript
242+
* // Set in typescript
243+
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
244+
* myComponent.dragIndicatorIconTemplate = myCustomTemplate;
245+
* ```
246+
* ```html
247+
* <!-- Set in markup -->
248+
* <igx-grid #grid>
249+
* ...
250+
* <ng-template igxDragIndicatorIcon>
251+
* <igx-icon fontSet="material">info</igx-icon>
252+
* </ng-template>
253+
* </igx-grid>
254+
* ```
255+
*/
256+
@ContentChild(IgxDragIndicatorIconDirective, { read: TemplateRef })
257+
public dragIndicatorIconTemplate: TemplateRef<any> = null;
258+
236259
@ViewChild('hierarchical_record_template', { read: TemplateRef })
237260
protected hierarchicalRecordTemplate: TemplateRef<any>;
238261

0 commit comments

Comments
 (0)