@@ -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 ) {
@@ -190,7 +190,8 @@ export class IgxGridHeaderComponent implements IGridBus, OnInit, DoCheck, AfterV
190
190
const actualWidth = this . elementRef . nativeElement . getBoundingClientRect ( ) . width ;
191
191
192
192
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 ;
194
195
195
196
if ( this . column . maxWidth && parseFloat ( this . column . maxWidth ) < pinnedMaxWidth ) {
196
197
this . _pinnedMaxWidth = this . column . maxWidth ;
@@ -301,7 +302,7 @@ export class IgxGridHeaderComponent implements IGridBus, OnInit, DoCheck, AfterV
301
302
const size = Math . ceil ( largestCell + largestCellPadding ) + 'px' ;
302
303
303
304
if ( this . column . pinned ) {
304
- const newPinnedWidth = this . grid . pinnedWidth - currentColWidth + parseFloat ( size ) ;
305
+ const newPinnedWidth = this . grid . getPinnedWidth ( true ) - currentColWidth + parseFloat ( size ) ;
305
306
306
307
if ( newPinnedWidth <= this . grid . calcPinnedContainerMaxWidth ) {
307
308
this . column . width = size ;
0 commit comments