Skip to content

Commit 0d1e3d7

Browse files
committed
fix(grid): move default template class on the host
1 parent cc124f7 commit 0d1e3d7

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

projects/igniteui-angular/src/lib/grids/cell.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class="igx-grid__td-text">{{ formatter ? formatter(value) : column.dataType === 'number' ? (value | igxdecimal:
99
grid.locale) : column.dataType === 'date' ? (value | igxdate: grid.locale) : column.dataType === 'boolean' ? "" : value }}
1010
</div>
11-
<igx-icon *ngIf="column.dataType === 'boolean'" [ngClass]="{'igx-grid__icon--checked': value}" >{{value ? 'check' : 'close'}}</igx-icon>
11+
<igx-icon *ngIf="column.dataType === 'boolean'">{{value ? 'check' : 'close'}}</igx-icon>
1212
</ng-template>
1313
<ng-template #inlineEditor let-cell="cell">
1414
<ng-container *ngIf="column.dataType === 'string'">

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

+5
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
287287
return this.editMode || this.cellTemplate ? '' : this.value;
288288
}
289289

290+
@HostBinding('class.igx-grid_td--bool-true')
291+
public get booleanClass() {
292+
return this.column.dataType === 'boolean' && this.value;
293+
}
294+
290295
/**
291296
* Returns a reference to the nativeElement of the cell.
292297
* ```typescript

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class="igx-grid__td-text">{{ formatter ? formatter(value) : column.dataType === 'number' ? (value | igxdecimal:
99
grid.locale) : column.dataType === 'date' ? (value | igxdate: grid.locale) : column.dataType === 'boolean' ? "" : value }}
1010
</div>
11-
<igx-icon *ngIf="column.dataType === 'boolean'" [ngClass]="{'igx-grid__icon--checked': value}">{{value ? 'check' : 'close'}}</igx-icon>
11+
<igx-icon *ngIf="column.dataType === 'boolean'">{{value ? 'check' : 'close'}}</igx-icon>
1212
</ng-template>
1313
<ng-template #inlineEditor let-cell="cell">
1414
<ng-container *ngIf="column.dataType === 'string'">

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

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
[class.igx-grid__td--edited]="rowID | transactionState:col.field:grid.rowEditable:grid.transactions:grid.pipeTrigger"
2222
[attr.aria-describedby]="gridID + '_' + col.field | igxStringReplace:'.':'_'"
2323
[class.igx-grid__td--number]="col.dataType === 'number'"
24+
[class.igx-grid__td--bool]="col.dataType === 'boolean'"
2425
[ngClass]="col.cellClasses | igxCellStyleClasses:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger"
2526
[ngStyle]="col.cellStyles | igxCellStyles:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger"
2627
[editMode]="col.editable && crudService.isInEditMode(index, col.index)"

0 commit comments

Comments
 (0)