File tree Expand file tree Collapse file tree 4 files changed +33
-9
lines changed
projects/igniteui-angular/src/lib
core/styles/components/grid Expand file tree Collapse file tree 4 files changed +33
-9
lines changed Original file line number Diff line number Diff line change 577
577
@extend %igx-grid__tr-pivot-group !optional
578
578
}
579
579
580
+ @include e (tr-pivot , $m : ' columnLeaf' ) {
581
+ @extend %igx-grid__tr-pivot--columnLeaf !optional
582
+ }
583
+
584
+ @include e (tr-pivot , $m : ' columnMultiRowSpan' ) {
585
+ @extend %igx-grid__tr-pivot--columnMultiRowSpan !optional
586
+ }
587
+
580
588
@include e (tr-pivot-toggle-icons ) {
581
589
@extend %igx-grid__tr-pivot-toggle-icons !optional ;
582
590
}
Original file line number Diff line number Diff line change 2977
2977
%igx-grid__tr-pivot-toggle-icons {
2978
2978
display : inline-flex !important ;
2979
2979
}
2980
+
2981
+ %igx-grid__tr-pivot--columnLeaf {
2982
+ box-shadow : none !important ;
2983
+ }
2984
+ %igx-grid__tr-pivot--columnMultiRowSpan {
2985
+ igx-grid-header {
2986
+ > * {
2987
+ visibility : hidden ;
2988
+ }
2989
+ }
2990
+ }
2980
2991
// Pivot grid END
2981
2992
}
2982
2993
Original file line number Diff line number Diff line change 163
163
</ ng-container >
164
164
</ ng-container >
165
165
< div [style.max-height.px] ='maxContainerHeight '>
166
- < div style ='overflow:visible; ' [style.height.px] ='grid.rowHeight ' class ="igx-grid-thead__group " *ngFor ='let dimLevelColumns of columnDimensionsByLevel ' [style.width.px] ='grid.unpinnedWidth '>
166
+ < div style ='overflow:visible; ' [style.height.px] ='grid.rowHeight ' class ="igx-grid-thead__group " *ngFor ='let dimLevelColumns of columnDimensionsByLevel; let i = index ' [style.width.px] ='grid.unpinnedWidth '>
167
167
< ng-template igxGridFor #headerVirtualContainer let-column
168
168
[igxGridForOf] ="dimLevelColumns " [igxGridForOfUniqueSizeCache] = 'true ' [igxForScrollContainer] ="grid.parentVirtDir "
169
169
[igxForContainerSize] ="grid.unpinnedWidth " [igxForTrackBy] ="grid.trackColumnChanges "
170
170
[igxForSizePropName] ="'calcPixelWidth' " [igxForScrollOrientation] ="'horizontal' ">
171
171
< igx-grid-header-group [ngClass] ="column.headerGroupClasses "
172
- [style.height.px] ='calcHeight(column) '
172
+ [style.height.px] ='calcHeight(column, i ) '
173
173
[ngStyle] ="column.headerGroupStyles |igxHeaderGroupStyle:column:grid.pipeTrigger " [column] ="column "
174
174
[style.min-width] ="column.calcWidth | igxHeaderGroupWidth:grid.defaultHeaderGroupMinWidth:hasMRL "
175
175
[style.flex-basis] ="column.calcWidth | igxHeaderGroupWidth:grid.defaultHeaderGroupMinWidth:hasMRL "
176
- (pointerdown) ="grid.navigation.focusOutRowHeader($event) "
177
- [style.visibility] ='getVisibility(column, dimLevelColumns) '>
176
+ [class.igx-grid__tr-pivot--columnLeaf] = 'isDuplicateOfExistingParent(column, i) '
177
+ [class.igx-grid__tr-pivot--columnMultiRowSpan] = 'isMultiRow(column, i) '
178
+ >
178
179
</ igx-grid-header-group >
179
180
</ ng-template >
180
181
</ div >
Original file line number Diff line number Diff line change @@ -94,16 +94,20 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent implem
94
94
return this . totalDepth * this . grid . renderedRowHeight ;
95
95
}
96
96
97
- public calcHeight ( col : ColumnType ) {
98
- return ! col . columnGroup && col . level < this . totalDepth ? ( this . totalDepth - col . level ) * this . grid . rowHeight : this . grid . rowHeight ;
97
+ public calcHeight ( col : ColumnType , index : number ) {
98
+ return ! col . columnGroup && col . level < this . totalDepth && col . level === index ? ( this . totalDepth - col . level ) * this . grid . rowHeight : this . grid . rowHeight ;
99
99
}
100
100
101
- public getVisibility ( col : ColumnType , collection : ColumnType [ ] ) {
102
- const lvl = this . columnDimensionsByLevel . indexOf ( collection )
101
+ public isDuplicateOfExistingParent ( col : ColumnType , lvl : number ) {
103
102
const parentCollection = lvl > 0 ? this . columnDimensionsByLevel [ lvl - 1 ] : [ ] ;
104
103
const duplicate = parentCollection . indexOf ( col ) !== - 1 ;
105
104
106
- return duplicate ? 'hidden' : undefined ;
105
+ return duplicate ;
106
+ }
107
+
108
+ public isMultiRow ( col : ColumnType , lvl : number ) {
109
+ const isLeaf = ! col . columnGroup ;
110
+ return isLeaf && lvl !== this . totalDepth - 1 ;
107
111
}
108
112
109
113
You can’t perform that action at this time.
0 commit comments