@@ -3122,12 +3122,12 @@ export abstract class IgxGridBaseDirective implements GridType,
31223122 /**
31233123 * @hidden
31243124 */
3125- protected _pinnedLeftColumns : IgxColumnComponent [ ] = [ ] ;
3125+ protected _pinnedStartColumns : IgxColumnComponent [ ] = [ ] ;
31263126
31273127 /**
31283128 * @hidden
31293129 */
3130- protected _pinnedRightColumns : IgxColumnComponent [ ] = [ ] ;
3130+ protected _pinnedEndColumns : IgxColumnComponent [ ] = [ ] ;
31313131
31323132 /**
31333133 * @hidden
@@ -4523,23 +4523,23 @@ export abstract class IgxGridBaseDirective implements GridType,
45234523 *
45244524 * @example
45254525 * ```typescript
4526- * const pinnedColumns = this.grid.pinnedLeftColumns .
4526+ * const pinnedColumns = this.grid.pinnedStartColumns .
45274527 * ```
45284528 */
4529- public get pinnedLeftColumns ( ) : IgxColumnComponent [ ] {
4530- return this . _pinnedLeftColumns . filter ( col => ! col . hidden ) ;
4529+ public get pinnedStartColumns ( ) : IgxColumnComponent [ ] {
4530+ return this . _pinnedStartColumns . filter ( col => ! col . hidden ) ;
45314531 }
45324532
45334533 /**
45344534 * Gets an array of the pinned to the right `IgxColumnComponent`s.
45354535 *
45364536 * @example
45374537 * ```typescript
4538- * const pinnedColumns = this.grid.pinnedRightColumns .
4538+ * const pinnedColumns = this.grid.pinnedEndColumns .
45394539 * ```
45404540 */
4541- public get pinnedRightColumns ( ) : IgxColumnComponent [ ] {
4542- return this . _pinnedRightColumns . filter ( col => ! col . hidden ) ;
4541+ public get pinnedEndColumns ( ) : IgxColumnComponent [ ] {
4542+ return this . _pinnedEndColumns . filter ( col => ! col . hidden ) ;
45434543 }
45444544
45454545 /* csSuppress */
@@ -4757,7 +4757,7 @@ export abstract class IgxGridBaseDirective implements GridType,
47574757 // pinning and unpinning will work correctly even without passing index
47584758 // but is easier to calclulate the index here, and later use it in the pinning event args
47594759 if ( target . pinned && ! column . pinned ) {
4760- const pinnedIndex = target . pinningPosition === ColumnPinningPosition . Start ? this . _pinnedLeftColumns . indexOf ( target ) : this . _pinnedRightColumns . indexOf ( target ) ;
4760+ const pinnedIndex = target . pinningPosition === ColumnPinningPosition . Start ? this . _pinnedStartColumns . indexOf ( target ) : this . _pinnedEndColumns . indexOf ( target ) ;
47614761 const index = pos === DropPosition . AfterDropTarget ? pinnedIndex + 1 : pinnedIndex ;
47624762 column . pin ( index ) ;
47634763 }
@@ -5166,9 +5166,9 @@ export abstract class IgxGridBaseDirective implements GridType,
51665166 * @param columnName
51675167 * @param index
51685168 */
5169- public pinColumn ( columnName : string | IgxColumnComponent , index ?: number ) : boolean {
5169+ public pinColumn ( columnName : string | IgxColumnComponent , index ?: number , pinningPosition ?: ColumnPinningPosition ) : boolean {
51705170 const col = columnName instanceof IgxColumnComponent ? columnName : this . getColumnByName ( columnName ) ;
5171- return col . pin ( index ) ;
5171+ return col . pin ( index , pinningPosition ) ;
51725172 }
51735173
51745174 /**
@@ -5612,7 +5612,7 @@ export abstract class IgxGridBaseDirective implements GridType,
56125612 * @param takeHidden If we should take into account the hidden columns in the pinned area.
56135613 */
56145614 public getPinnedLeftWidth ( takeHidden = false ) {
5615- const fc = takeHidden ? this . _pinnedLeftColumns : this . pinnedLeftColumns ;
5615+ const fc = takeHidden ? this . _pinnedStartColumns : this . pinnedStartColumns ;
56165616 let sum = 0 ;
56175617 for ( const col of fc ) {
56185618 if ( col . level === 0 ) {
@@ -5634,7 +5634,7 @@ export abstract class IgxGridBaseDirective implements GridType,
56345634 * @param takeHidden If we should take into account the hidden columns in the pinned area.
56355635 */
56365636 public getPinnedRightWidth ( takeHidden = false ) {
5637- const fc = takeHidden ? this . _pinnedRightColumns : this . pinnedRightColumns ;
5637+ const fc = takeHidden ? this . _pinnedEndColumns : this . pinnedEndColumns ;
56385638 let sum = 0 ;
56395639 for ( const col of fc ) {
56405640 if ( col . level === 0 ) {
@@ -6747,7 +6747,7 @@ export abstract class IgxGridBaseDirective implements GridType,
67476747 * @hidden
67486748 */
67496749 protected _moveColumns ( from : IgxColumnComponent , to : IgxColumnComponent , pos : DropPosition ) {
6750- const orderedList = this . _pinnedLeftColumns . concat ( this . _unpinnedColumns ) . concat ( this . _pinnedRightColumns ) ;
6750+ const orderedList = this . _pinnedStartColumns . concat ( this . _unpinnedColumns ) . concat ( this . _pinnedEndColumns ) ;
67516751 const list = orderedList ;
67526752 this . _reorderColumns ( from , to , pos , list ) ;
67536753 const newList = this . _resetColumnList ( list ) ;
@@ -6763,8 +6763,8 @@ export abstract class IgxGridBaseDirective implements GridType,
67636763 // update internal collections to retain order.
67646764 this . _pinnedColumns = newColumns
67656765 . filter ( ( c ) => c . pinned ) ;
6766- this . _pinnedLeftColumns = newColumns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . Start ) ;
6767- this . _pinnedRightColumns = newColumns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . End ) ;
6766+ this . _pinnedStartColumns = newColumns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . Start ) ;
6767+ this . _pinnedEndColumns = newColumns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . End ) ;
67686768 this . _unpinnedColumns = newColumns . filter ( ( c ) => ! c . pinned ) ;
67696769 this . _columns = newColumns ;
67706770 if ( this . _columns && this . _columns . length && this . _filteringExpressionsTree ) {
@@ -6918,9 +6918,9 @@ export abstract class IgxGridBaseDirective implements GridType,
69186918 if ( record . item . pinned ) {
69196919 this . _pinnedColumns . push ( record . item ) ;
69206920 if ( record . item . pinningPosition === ColumnPinningPosition . Start ) {
6921- this . _pinnedLeftColumns . push ( record . item ) ;
6921+ this . _pinnedStartColumns . push ( record . item ) ;
69226922 } else {
6923- this . _pinnedRightColumns . push ( record . item ) ;
6923+ this . _pinnedEndColumns . push ( record . item ) ;
69246924 }
69256925 pinning = true ;
69266926 } else {
@@ -7336,10 +7336,10 @@ export abstract class IgxGridBaseDirective implements GridType,
73367336 protected reinitPinStates ( ) {
73377337 this . _pinnedColumns = this . _columns
73387338 . filter ( ( c ) => c . pinned ) . sort ( ( a , b ) => this . _pinnedColumns . indexOf ( a ) - this . _pinnedColumns . indexOf ( b ) ) ;
7339- this . _pinnedLeftColumns = this . _columns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . Start )
7340- . sort ( ( a , b ) => this . _pinnedLeftColumns . indexOf ( a ) - this . _pinnedLeftColumns . indexOf ( b ) ) ;
7341- this . _pinnedRightColumns = this . _columns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . End )
7342- . sort ( ( a , b ) => this . _pinnedRightColumns . indexOf ( a ) - this . _pinnedRightColumns . indexOf ( b ) ) ;
7339+ this . _pinnedStartColumns = this . _columns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . Start )
7340+ . sort ( ( a , b ) => this . _pinnedStartColumns . indexOf ( a ) - this . _pinnedStartColumns . indexOf ( b ) ) ;
7341+ this . _pinnedEndColumns = this . _columns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . End )
7342+ . sort ( ( a , b ) => this . _pinnedEndColumns . indexOf ( a ) - this . _pinnedEndColumns . indexOf ( b ) ) ;
73437343 this . _unpinnedColumns = this . hasColumnGroups ? this . _columns . filter ( ( c ) => ! c . pinned ) :
73447344 this . _columns . filter ( ( c ) => ! c . pinned )
73457345 . sort ( ( a , b ) => this . _unpinnedColumns . indexOf ( a ) - this . _unpinnedColumns . indexOf ( b ) ) ;
@@ -8051,8 +8051,8 @@ export abstract class IgxGridBaseDirective implements GridType,
80518051 }
80528052 // Assign the applicable collections.
80538053 this . _pinnedColumns = pinnedColumns ;
8054- this . _pinnedLeftColumns = pinnedColumns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . Start ) ;
8055- this . _pinnedRightColumns = pinnedColumns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . End ) ;
8054+ this . _pinnedStartColumns = pinnedColumns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . Start ) ;
8055+ this . _pinnedEndColumns = pinnedColumns . filter ( ( c ) => c . pinned && c . pinningPosition === ColumnPinningPosition . End ) ;
80568056 this . _unpinnedColumns = unpinnedColumns ;
80578057 }
80588058
0 commit comments