@@ -17,7 +17,6 @@ import { DataType } from '../data-operations/data-util';
1717import { SortingDirection } from '../data-operations/sorting-expression.interface' ;
1818import { RestrictDrag } from '../directives/dragdrop/dragdrop.directive' ;
1919import { IgxGridAPIService } from './api.service' ;
20- import { IgxGridCellComponent } from './cell.component' ;
2120import { IgxColumnComponent } from './column.component' ;
2221import { autoWire , IGridBus , IgxColumnMovingService } from './grid.common' ;
2322
@@ -153,6 +152,7 @@ export class IgxGridHeaderComponent implements IGridBus, OnInit, DoCheck, AfterV
153152 @HostListener ( 'click' , [ '$event' ] )
154153 @autoWire ( true )
155154 public onClick ( event ) {
155+
156156 if ( ! this . column . grid . isColumnResizing ) {
157157 event . stopPropagation ( ) ;
158158 if ( this . column . sortable ) {
@@ -190,7 +190,8 @@ export class IgxGridHeaderComponent implements IGridBus, OnInit, DoCheck, AfterV
190190 const actualWidth = this . elementRef . nativeElement . getBoundingClientRect ( ) . width ;
191191
192192 if ( this . column . pinned ) {
193- const pinnedMaxWidth = this . _pinnedMaxWidth = this . grid . calcPinnedContainerMaxWidth - this . grid . pinnedWidth + actualWidth ;
193+ const pinnedMaxWidth = this . _pinnedMaxWidth =
194+ this . grid . calcPinnedContainerMaxWidth - this . grid . getPinnedWidth ( true ) + actualWidth ;
194195
195196 if ( this . column . maxWidth && parseFloat ( this . column . maxWidth ) < pinnedMaxWidth ) {
196197 this . _pinnedMaxWidth = this . column . maxWidth ;
@@ -301,7 +302,7 @@ export class IgxGridHeaderComponent implements IGridBus, OnInit, DoCheck, AfterV
301302 const size = Math . ceil ( largestCell + largestCellPadding ) + 'px' ;
302303
303304 if ( this . column . pinned ) {
304- const newPinnedWidth = this . grid . pinnedWidth - currentColWidth + parseFloat ( size ) ;
305+ const newPinnedWidth = this . grid . getPinnedWidth ( true ) - currentColWidth + parseFloat ( size ) ;
305306
306307 if ( newPinnedWidth <= this . grid . calcPinnedContainerMaxWidth ) {
307308 this . column . width = size ;
0 commit comments