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 577577 @extend %igx-grid__tr-pivot-group !optional
578578 }
579579
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+
580588 @include e (tr-pivot-toggle-icons ) {
581589 @extend %igx-grid__tr-pivot-toggle-icons !optional ;
582590 }
Original file line number Diff line number Diff line change 29772977 %igx-grid__tr-pivot-toggle-icons {
29782978 display : inline-flex !important ;
29792979 }
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+ }
29802991 // Pivot grid END
29812992}
29822993
Original file line number Diff line number Diff line change 163163 </ ng-container >
164164 </ ng-container >
165165 < 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 '>
167167 < ng-template igxGridFor #headerVirtualContainer let-column
168168 [igxGridForOf] ="dimLevelColumns " [igxGridForOfUniqueSizeCache] = 'true ' [igxForScrollContainer] ="grid.parentVirtDir "
169169 [igxForContainerSize] ="grid.unpinnedWidth " [igxForTrackBy] ="grid.trackColumnChanges "
170170 [igxForSizePropName] ="'calcPixelWidth' " [igxForScrollOrientation] ="'horizontal' ">
171171 < igx-grid-header-group [ngClass] ="column.headerGroupClasses "
172- [style.height.px] ='calcHeight(column) '
172+ [style.height.px] ='calcHeight(column, i ) '
173173 [ngStyle] ="column.headerGroupStyles |igxHeaderGroupStyle:column:grid.pipeTrigger " [column] ="column "
174174 [style.min-width] ="column.calcWidth | igxHeaderGroupWidth:grid.defaultHeaderGroupMinWidth:hasMRL "
175175 [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+ >
178179 </ igx-grid-header-group >
179180 </ ng-template >
180181 </ div >
Original file line number Diff line number Diff line change @@ -94,16 +94,20 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent implem
9494 return this . totalDepth * this . grid . renderedRowHeight ;
9595 }
9696
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 ;
9999 }
100100
101- public getVisibility ( col : ColumnType , collection : ColumnType [ ] ) {
102- const lvl = this . columnDimensionsByLevel . indexOf ( collection )
101+ public isDuplicateOfExistingParent ( col : ColumnType , lvl : number ) {
103102 const parentCollection = lvl > 0 ? this . columnDimensionsByLevel [ lvl - 1 ] : [ ] ;
104103 const duplicate = parentCollection . indexOf ( col ) !== - 1 ;
105104
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 ;
107111 }
108112
109113
You can’t perform that action at this time.
0 commit comments