@@ -17,7 +17,6 @@ import { DataType } from '../data-operations/data-util';
17
17
import { SortingDirection } from '../data-operations/sorting-expression.interface' ;
18
18
import { RestrictDrag } from '../directives/dragdrop/dragdrop.directive' ;
19
19
import { IgxGridAPIService } from './api.service' ;
20
- import { IgxGridCellComponent } from './cell.component' ;
21
20
import { IgxColumnComponent } from './column.component' ;
22
21
import { autoWire , IGridBus , IgxColumnMovingService } from './grid.common' ;
23
22
@@ -153,6 +152,7 @@ export class IgxGridHeaderComponent implements IGridBus, OnInit, DoCheck, AfterV
153
152
@HostListener ( 'click' , [ '$event' ] )
154
153
@autoWire ( true )
155
154
public onClick ( event ) {
155
+
156
156
if ( ! this . column . grid . isColumnResizing ) {
157
157
event . stopPropagation ( ) ;
158
158
if ( this . column . sortable ) {
@@ -187,7 +187,8 @@ export class IgxGridHeaderComponent implements IGridBus, OnInit, DoCheck, AfterV
187
187
const actualWidth = this . elementRef . nativeElement . getBoundingClientRect ( ) . width ;
188
188
189
189
if ( this . column . pinned ) {
190
- const pinnedMaxWidth = this . _pinnedMaxWidth = this . grid . calcPinnedContainerMaxWidth - this . grid . pinnedWidth + actualWidth ;
190
+ const pinnedMaxWidth = this . _pinnedMaxWidth =
191
+ this . grid . calcPinnedContainerMaxWidth - this . grid . getPinnedWidth ( true ) + actualWidth ;
191
192
192
193
if ( this . column . maxWidth && parseFloat ( this . column . maxWidth ) < pinnedMaxWidth ) {
193
194
this . _pinnedMaxWidth = this . column . maxWidth ;
@@ -298,7 +299,7 @@ export class IgxGridHeaderComponent implements IGridBus, OnInit, DoCheck, AfterV
298
299
const size = Math . ceil ( largestCell + largestCellPadding ) + 'px' ;
299
300
300
301
if ( this . column . pinned ) {
301
- const newPinnedWidth = this . grid . pinnedWidth - currentColWidth + parseFloat ( size ) ;
302
+ const newPinnedWidth = this . grid . getPinnedWidth ( true ) - currentColWidth + parseFloat ( size ) ;
302
303
303
304
if ( newPinnedWidth <= this . grid . calcPinnedContainerMaxWidth ) {
304
305
this . column . width = size ;
0 commit comments