@@ -180,6 +180,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
180
180
private overlayIDs = [ ] ;
181
181
private _filteringStrategy : IFilteringStrategy ;
182
182
private _sortingStrategy : IGridSortingStrategy ;
183
+ private _pinning : IPinningConfig = { columns : ColumnPinningPosition . Start } ;
183
184
184
185
private _hostWidth ;
185
186
private _advancedFilteringOverlayId : string ;
@@ -813,7 +814,16 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
813
814
* ```
814
815
*/
815
816
@Input ( )
816
- public pinning : IPinningConfig = { columns : ColumnPinningPosition . Start } ;
817
+ get pinning ( ) {
818
+ return this . _pinning ;
819
+ }
820
+ set pinning ( value ) {
821
+ if ( value !== this . _pinning ) {
822
+ this . resetCaches ( ) ;
823
+ }
824
+ this . _pinning = value ;
825
+ }
826
+
817
827
818
828
/**
819
829
* Gets/Sets if the built-in column pinning UI should be shown in the toolbar.
@@ -2520,6 +2530,14 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
2520
2530
this . hideOverlays ( ) ;
2521
2531
}
2522
2532
2533
+ /**
2534
+ * @hidden
2535
+ * @internal
2536
+ */
2537
+ public get headerFeaturesWidth ( ) {
2538
+ return this . _headerFeaturesWidth ;
2539
+ }
2540
+
2523
2541
/**
2524
2542
* @hidden
2525
2543
* @internal
@@ -4651,7 +4669,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4651
4669
sum += parseInt ( col . calcWidth , 10 ) ;
4652
4670
}
4653
4671
}
4654
- sum += this . featureColumnsWidth ( ) ;
4672
+ if ( this . pinning . columns === ColumnPinningPosition . Start ) {
4673
+ sum += this . featureColumnsWidth ( ) ;
4674
+ }
4655
4675
4656
4676
return sum ;
4657
4677
}
@@ -4668,6 +4688,10 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4668
4688
if ( this . hasVerticalSroll ( ) && ! this . isPercentWidth ) {
4669
4689
width -= this . scrollWidth ;
4670
4690
}
4691
+ if ( this . pinning . columns === ColumnPinningPosition . End ) {
4692
+ width -= this . featureColumnsWidth ( ) ;
4693
+ }
4694
+
4671
4695
return width - this . getPinnedWidth ( takeHidden ) ;
4672
4696
}
4673
4697
0 commit comments