Skip to content

Commit 401370e

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Fix chip displaying when in merged cell.
1 parent 7ac17e4 commit 401370e

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
[lastSearchInfo]="grid.lastSearchInfo"
163163
[active]="isCellActive(col.visibleIndex)"
164164
[cellSelectionMode]="grid.cellSelection"
165-
[displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"
165+
[displayPinnedChip]="shouldDisplayPinnedChip(col)"
166166
#cell>
167167
</igx-grid-cell>
168168
</ng-template>
@@ -194,7 +194,7 @@
194194
[lastSearchInfo]="grid.lastSearchInfo"
195195
[active]="isCellActive(col.visibleIndex)"
196196
[cellSelectionMode]="grid.cellSelection"
197-
[displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"
197+
[displayPinnedChip]="shouldDisplayPinnedChip(col)"
198198
#cell>
199199
</igx-expandable-grid-cell>
200200
</ng-template>
@@ -226,7 +226,7 @@
226226
[lastSearchInfo]="grid.lastSearchInfo"
227227
[active]="isCellActive(col.visibleIndex)"
228228
[cellSelectionMode]="grid.cellSelection"
229-
[displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"
229+
[displayPinnedChip]="shouldDisplayPinnedChip(col)"
230230
#cell>
231231
</igx-grid-cell>
232232
</ng-template>
@@ -258,7 +258,7 @@
258258
[lastSearchInfo]="grid.lastSearchInfo"
259259
[active]="isCellActive(col.visibleIndex)"
260260
[cellSelectionMode]="grid.cellSelection"
261-
[displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"
261+
[displayPinnedChip]="shouldDisplayPinnedChip(col)"
262262
#cell>
263263
</igx-expandable-grid-cell>
264264
</ng-template>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
[cellValidationErrorTemplate]="col.errorTemplate"
115115
[lastSearchInfo]="grid.lastSearchInfo"
116116
[cellSelectionMode]="grid.cellSelection"
117-
[displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)">
117+
[displayPinnedChip]="shouldDisplayPinnedChip(col)">
118118
</igx-hierarchical-grid-cell>
119119
}
120120
</ng-template>
@@ -148,6 +148,6 @@
148148
[cellValidationErrorTemplate]="col.errorTemplate"
149149
[lastSearchInfo]="grid.lastSearchInfo"
150150
[cellSelectionMode]="grid.cellSelection"
151-
[displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)">
151+
[displayPinnedChip]="shouldDisplayPinnedChip(col)">
152152
</igx-hierarchical-grid-cell>
153153
</ng-template>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
[style.flex-basis]="col.resolvedWidth" [width]="col.getCellWidth()" [visibleColumnIndex]="col.visibleIndex"
1717
[value]="pivotAggregationData[col.field] | dataMapper:col.field:grid.pipeTrigger:pivotAggregationData[col.field]:col.hasNestedPath"
1818
[cellTemplate]="col.bodyTemplate" [lastSearchInfo]="grid.lastSearchInfo"
19-
[cellSelectionMode]="grid.cellSelection" [displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"
19+
[cellSelectionMode]="grid.cellSelection" [displayPinnedChip]="shouldDisplayPinnedChip(col)"
2020
(pointerdown)="grid.navigation.focusOutRowHeader($event)">
2121
</igx-grid-cell>
2222
</ng-template>

projects/igniteui-angular/src/lib/grids/row.directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ export class IgxRowDirective implements DoCheck, AfterViewInit, OnDestroy {
578578
/**
579579
* @hidden
580580
*/
581-
public shouldDisplayPinnedChip(visibleColumnIndex: number): boolean {
582-
return this.pinned && this.disabled && visibleColumnIndex === 0;
581+
public shouldDisplayPinnedChip(col: ColumnType): boolean {
582+
return this.pinned && this.disabled && col.visibleIndex === 0 && !this.metaData?.cellMergeMeta?.get(col.field)?.root;
583583
}
584584

585585
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
[lastSearchInfo]="grid.lastSearchInfo"
106106
[active]="isCellActive(col.visibleIndex)"
107107
[cellSelectionMode]="grid.cellSelection"
108-
[displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"
108+
[displayPinnedChip]="shouldDisplayPinnedChip(col)"
109109
#treeCell>
110110
</igx-grid-cell>
111111
</ng-template>
@@ -142,7 +142,7 @@
142142
[lastSearchInfo]="grid.lastSearchInfo"
143143
[active]="isCellActive(col.visibleIndex)"
144144
[cellSelectionMode]="grid.cellSelection"
145-
[displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"
145+
[displayPinnedChip]="shouldDisplayPinnedChip(col)"
146146
#treeCell>
147147
</igx-tree-grid-cell>
148148
</ng-template>

src/app/grid-cellMerging/grid-cellMerging.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ <h4 class="sample-title">Hierarchical grid with cell merge</h4>
5959
</igx-column>
6060
<igx-column field="ShipCity" width="200px" [merge]="true" sortable="true">
6161
</igx-column>
62-
6362
</igx-row-island>
6463
</igx-hierarchical-grid>
6564

src/app/grid-cellMerging/grid-cellMerging.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export class GridCellMergingComponent {
5050
public hierarchicalData = HIERARCHICAL_DATA.concat(HIERARCHICAL_DATA).concat(HIERARCHICAL_DATA);
5151
public treeData = HIERARCHICAL_SAMPLE_DATA;
5252
public treeGridMergeStrategy = new ByLevelTreeGridMergeStrategy();
53+
public alignBottom = { alignItems: "flex-end", paddingBottom: "12px"};
54+
public alignTop= { alignItems: "flex-start", paddingTop: "12px" };
5355
public data = [{
5456
ProductID: 1,
5557
ProductName: 'Chai',

0 commit comments

Comments
 (0)