Skip to content

Commit 383423c

Browse files
authored
Merge branch '8.2.x' into dmdimitrov/issue6257-8.2.x
2 parents aefbe6a + 60ec1df commit 383423c

File tree

5 files changed

+21
-64
lines changed

5 files changed

+21
-64
lines changed

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ import { DeprecateProperty } from '../core/deprecateDecorators';
103103
import { IFilteringStrategy } from '../data-operations/filtering-strategy';
104104
import { IgxRowExpandedIndicatorDirective, IgxRowCollapsedIndicatorDirective,
105105
IgxHeaderExpandIndicatorDirective, IgxHeaderCollapseIndicatorDirective } from './grid/grid.directives';
106-
import { IgxRowDragGhostDirective } from './row-drag.directive';
106+
import { IgxRowDragGhostDirective, IgxDragIndicatorIconDirective } from './row-drag.directive';
107107
import { GridKeydownTargetType, GridSelectionMode, GridSummaryPosition, GridSummaryCalculationMode, FilterMode } from './common/enums';
108108

109109
const MINIMUM_COLUMN_WIDTH = 136;
@@ -229,6 +229,7 @@ export interface IRowDragStartEventArgs extends CancelableEventArgs, IBaseEventA
229229
export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
230230
OnInit, DoCheck, OnDestroy, AfterContentInit, AfterViewInit {
231231
private _scrollWidth: number;
232+
private _customDragIndicatorIconTemplate: TemplateRef<any>;
232233
protected _init = true;
233234
private _tick;
234235
private _cdrRequests = false;
@@ -1945,6 +1946,22 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
19451946
@ContentChildren(IgxRowDragGhostDirective, { read: TemplateRef, descendants: false })
19461947
public dragGhostCustomTemplates: QueryList<TemplateRef<any>>;
19471948

1949+
/**
1950+
* @hidden
1951+
* @internal
1952+
*/
1953+
@ContentChildren(IgxDragIndicatorIconDirective, { read: TemplateRef, descendants: false })
1954+
public dragIndicatorIconTemplates: QueryList<TemplateRef<any>>;
1955+
/**
1956+
* The custom template, if any, that should be used when rendering the row drag indicator icon
1957+
*/
1958+
public get dragIndicatorIconTemplate(): TemplateRef<any> {
1959+
return this._customDragIndicatorIconTemplate || this.dragIndicatorIconTemplates.first;
1960+
}
1961+
1962+
public set dragIndicatorIconTemplate(val: TemplateRef<any>) {
1963+
this._customDragIndicatorIconTemplate = val;
1964+
}
19481965
/**
19491966
* @hidden
19501967
*/

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -471,27 +471,6 @@ export class IgxGridComponent extends IgxGridBaseComponent implements IGridDataB
471471
@ContentChild(IgxGroupByRowTemplateDirective, { read: IgxGroupByRowTemplateDirective, static: false })
472472
protected groupTemplate: IgxGroupByRowTemplateDirective;
473473

474-
/**
475-
* The custom template, if any, that should be used when rendering the row drag indicator icon
476-
*
477-
* ```typescript
478-
* // Set in typescript
479-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
480-
* myComponent.dragIndicatorIconTemplate = myCustomTemplate;
481-
* ```
482-
* ```html
483-
* <!-- Set in markup -->
484-
* <igx-grid #grid>
485-
* ...
486-
* <ng-template igxDragIndicatorIcon>
487-
* <igx-icon fontSet="material">info</igx-icon>
488-
* </ng-template>
489-
* </igx-grid>
490-
* ```
491-
*/
492-
@ContentChild(IgxDragIndicatorIconDirective, { read: TemplateRef, static: false })
493-
public dragIndicatorIconTemplate: TemplateRef<any> = null;
494-
495474
@ViewChildren(IgxGridGroupByRowComponent, { read: IgxGridGroupByRowComponent })
496475
private _groupsRowList: QueryList<IgxGridGroupByRowComponent>;
497476

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -94,27 +94,6 @@ export abstract class IgxHierarchicalGridBaseComponent extends IgxGridBaseCompon
9494
@ViewChild('dragIndicatorIconBase', { read: TemplateRef, static: true })
9595
public dragIndicatorIconBase: TemplateRef<any>;
9696

97-
98-
/**
99-
* The custom template, if any, that should be used when rendering the row drag indicator icon
100-
*
101-
* ```typescript
102-
* // Set in typescript
103-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
104-
* myComponent.dragIndicatorIconTemplate = myCustomTemplate;
105-
* ```
106-
* ```html
107-
* <!-- Set in markup -->
108-
* <igx-grid #grid>
109-
* ...
110-
* <ng-template igxDragIndicatorIcon>
111-
* <igx-icon fontSet="material">info</igx-icon>
112-
* </ng-template>
113-
* </igx-grid>
114-
* ```
115-
*/
116-
public dragIndicatorIconTemplate: TemplateRef<any> = null;
117-
11897
constructor(
11998
public selectionService: IgxGridSelectionService,
12099
crudService: IgxGridCRUDService,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseCompone
411411
this.rowSelectorsTemplates = this.parentIsland ?
412412
this.parentIsland.rowSelectorsTemplates :
413413
this.rowSelectorsTemplates;
414+
this.dragIndicatorIconTemplate = this.parentIsland ?
415+
this.parentIsland.dragIndicatorIconTemplate :
416+
this.dragIndicatorIconTemplate;
414417
this.rowExpandedIndicatorTemplate = this.rootGrid.rowExpandedIndicatorTemplate;
415418
this.rowCollapsedIndicatorTemplate = this.rootGrid.rowCollapsedIndicatorTemplate;
416419
this.headerCollapseIndicatorTemplate = this.rootGrid.headerCollapseIndicatorTemplate;

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -313,27 +313,6 @@ export class IgxTreeGridComponent extends IgxGridBaseComponent implements IGridD
313313
@ContentChild(IgxRowLoadingIndicatorTemplateDirective, { read: IgxRowLoadingIndicatorTemplateDirective, static: false })
314314
protected rowLoadingTemplate: IgxRowLoadingIndicatorTemplateDirective;
315315

316-
/**
317-
* The custom template, if any, that should be used when rendering the row drag indicator icon
318-
*
319-
* ```typescript
320-
* // Set in typescript
321-
* const myCustomTemplate: TemplateRef<any> = myComponent.customTemplate;
322-
* myComponent.dragIndicatorIconTemplate = myCustomTemplate;
323-
* ```
324-
* ```html
325-
* <!-- Set in markup -->
326-
* <igx-grid #grid>
327-
* ...
328-
* <ng-template igxDragIndicatorIcon>
329-
* <igx-icon fontSet="material">info</igx-icon>
330-
* </ng-template>
331-
* </igx-grid>
332-
* ```
333-
*/
334-
@ContentChild(IgxDragIndicatorIconDirective, { read: TemplateRef, static: false })
335-
public dragIndicatorIconTemplate: TemplateRef<any> = null;
336-
337316
/**
338317
* An @Input property that provides a template for the row loading indicator when load on demand is enabled.
339318
* ```html

0 commit comments

Comments
 (0)