@@ -180,6 +180,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
180180 private overlayIDs = [ ] ;
181181 private _filteringStrategy : IFilteringStrategy ;
182182 private _sortingStrategy : IGridSortingStrategy ;
183+ private _pinning : IPinningConfig = { columns : ColumnPinningPosition . Start } ;
183184
184185 private _hostWidth ;
185186 private _advancedFilteringOverlayId : string ;
@@ -813,7 +814,16 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
813814 * ```
814815 */
815816 @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+
817827
818828 /**
819829 * 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
25202530 this . hideOverlays ( ) ;
25212531 }
25222532
2533+ /**
2534+ * @hidden
2535+ * @internal
2536+ */
2537+ public get headerFeaturesWidth ( ) {
2538+ return this . _headerFeaturesWidth ;
2539+ }
2540+
25232541 /**
25242542 * @hidden
25252543 * @internal
@@ -4651,7 +4669,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
46514669 sum += parseInt ( col . calcWidth , 10 ) ;
46524670 }
46534671 }
4654- sum += this . featureColumnsWidth ( ) ;
4672+ if ( this . pinning . columns === ColumnPinningPosition . Start ) {
4673+ sum += this . featureColumnsWidth ( ) ;
4674+ }
46554675
46564676 return sum ;
46574677 }
@@ -4668,6 +4688,10 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
46684688 if ( this . hasVerticalSroll ( ) && ! this . isPercentWidth ) {
46694689 width -= this . scrollWidth ;
46704690 }
4691+ if ( this . pinning . columns === ColumnPinningPosition . End ) {
4692+ width -= this . featureColumnsWidth ( ) ;
4693+ }
4694+
46714695 return width - this . getPinnedWidth ( takeHidden ) ;
46724696 }
46734697
0 commit comments