Skip to content

Commit 9eba52c

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Renaming directive selectors so that they represent component state (igxRowExpandedIndicator/igxRowCollapsedIndicator and igxHeaderExpandedIndicator/igxHeaderCollapsedIndicator). Updating sample with custom icons.
1 parent c297baa commit 9eba52c

File tree

5 files changed

+25
-16
lines changed

5 files changed

+25
-16
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class IgxGroupByRowTemplateDirective {
2121
* @hidden
2222
*/
2323
@Directive({
24-
selector: '[igxRowExpandIndicator]'
24+
selector: '[igxRowExpandedIndicator]'
2525
})
2626
export class IgxRowExpandIndicatorDirective {
2727
}
@@ -30,7 +30,7 @@ export class IgxRowExpandIndicatorDirective {
3030
* @hidden
3131
*/
3232
@Directive({
33-
selector: '[igxRowCollapseIndicator]'
33+
selector: '[igxRowCollapsedIndicator]'
3434
})
3535
export class IgxRowCollapseIndicatorDirective {
3636
}
@@ -40,7 +40,7 @@ export class IgxRowCollapseIndicatorDirective {
4040
* @hidden
4141
*/
4242
@Directive({
43-
selector: '[igxHeaderExpandIndicator]'
43+
selector: '[igxHeaderExpandedIndicator]'
4444
})
4545
export class IgxHeaderExpandIndicatorDirective {
4646
}
@@ -49,7 +49,7 @@ export class IgxHeaderExpandIndicatorDirective {
4949
* @hidden
5050
*/
5151
@Directive({
52-
selector: '[igxHeaderCollapseIndicator]'
52+
selector: '[igxHeaderCollapsedIndicator]'
5353
})
5454
export class IgxHeaderCollapseIndicatorDirective {
5555
}

projects/igniteui-angular/src/lib/grids/grid/grid.groupby.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,17 +2699,17 @@ export class GroupableGridComponent extends DataParent {
26992699
<ng-template igxGroupByRow let-groupRow>
27002700
<span>Total items with value:{{ groupRow.value }} are {{ groupRow.records.length }}</span>
27012701
</ng-template>
2702-
<ng-template igxRowExpandIndicator let-groupRow>
2702+
<ng-template igxRowExpandedIndicator let-groupRow>
27032703
<span>EXPANDED</span>
27042704
</ng-template>
2705-
<ng-template igxRowCollapseIndicator let-groupRow>
2705+
<ng-template igxRowCollapsedIndicator let-groupRow>
27062706
<span>COLLAPSED</span>
27072707
</ng-template>
27082708
2709-
<ng-template igxHeaderExpandIndicator>
2709+
<ng-template igxHeaderExpandedIndicator>
27102710
<span>EXPANDED</span>
27112711
</ng-template>
2712-
<ng-template igxHeaderCollapseIndicator>
2712+
<ng-template igxHeaderCollapsedIndicator>
27132713
<span>COLLAPSED</span>
27142714
</ng-template>
27152715
</igx-grid>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,16 +1370,16 @@ public toggleChildRI = true;
13701370
<igx-row-island [key]="'childData'" [autoGenerate]="true" #rowIsland2 >
13711371
</igx-row-island>
13721372
</igx-row-island>
1373-
<ng-template igxRowExpandIndicator>
1373+
<ng-template igxRowExpandedIndicator>
13741374
<span>EXPANDED</span>
13751375
</ng-template>
1376-
<ng-template igxRowCollapseIndicator>
1376+
<ng-template igxRowCollapsedIndicator>
13771377
<span>COLLAPSED</span>
13781378
</ng-template>
1379-
<ng-template igxHeaderCollapseIndicator>
1379+
<ng-template igxHeaderCollapsedIndicator>
13801380
<span>COLLAPSED</span>
13811381
</ng-template>
1382-
<ng-template igxHeaderExpandIndicator>
1382+
<ng-template igxHeaderExpandedIndicator>
13831383
<span>EXPANDED</span>
13841384
</ng-template>
13851385
</igx-hierarchical-grid>`

projects/igniteui-angular/src/lib/test-utils/tree-grid-components.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,10 @@ export class IgxTreeGridDefaultLoadingComponent implements OnInit {
737737
<igx-column [field]="'Name'" dataType="string" [sortable]="true"></igx-column>
738738
<igx-column [field]="'HireDate'" dataType="date" [sortable]="true"></igx-column>
739739
<igx-column [field]="'Age'" dataType="number" [sortable]="true"></igx-column>
740-
<ng-template igxRowExpandIndicator>
740+
<ng-template igxRowExpandedIndicator>
741741
<span>EXPANDED</span>
742742
</ng-template>
743-
<ng-template igxRowCollapseIndicator>
743+
<ng-template igxRowCollapsedIndicator>
744744
<span>COLLAPSED</span>
745745
</ng-template>
746746
</igx-tree-grid>

src/app/hierarchical-grid/hierarchical-grid.sample.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@ <h4 class="sample-title">Sample One</h4>
1010
<igx-column field="ChildLevels" [resizable]="true" [groupable]='true'></igx-column>
1111
<igx-column field="ProductName" hasSummary='true'></igx-column>
1212
</igx-column-group>
13-
<ng-template igxHeaderCollapseIndicator let-hgrid>
14-
<igx-icon role="button" fontSet="material" (click)="hgrid.expandAll()">unfold_more</igx-icon>
13+
<ng-template igxHeaderCollapsedIndicator let-hgrid>
14+
<igx-icon role="button" fontSet="material" (click)="hgrid.expandAll()">add</igx-icon>
15+
</ng-template>
16+
<ng-template igxHeaderExpandedIndicator let-hgrid>
17+
<igx-icon role="button" fontSet="material" (click)="hgrid.collapseAll()">remove</igx-icon>
18+
</ng-template>
19+
<ng-template igxRowExpandedIndicator let-row>
20+
<igx-icon role="button" fontSet="material">remove</igx-icon>
21+
</ng-template>
22+
<ng-template igxRowCollapsedIndicator let-row>
23+
<igx-icon role="button" fontSet="material">add</igx-icon>
1524
</ng-template>
1625
<igx-row-island [key]="'childData'" [autoGenerate]="false" [allowFiltering]='false' [rowSelectable]='isRowSelectable' [expandChildren]="firstLevelExpanded" #layout1 >
1726
<igx-column field="ID" [hasSummary]='true' [dataType]="'number'"></igx-column>

0 commit comments

Comments
 (0)