File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
projects/igniteui-angular/src/lib/grids/filtering/excel-style Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,14 @@ export class IgxExcelStyleColumnMovingComponent {
2626 }
2727
2828 get canNotMoveLeft ( ) {
29- const prevIndex = this . grid . columns . indexOf ( this . column ) - 1 ;
3029 return this . column . visibleIndex === 0 ||
3130 ( this . grid . unpinnedColumns . indexOf ( this . column ) === 0 && this . column . disablePinning ) ||
32- ( this . column . level !== 0 && this . grid . columns [ prevIndex ] && this . grid . columns [ prevIndex ] . level !== this . column . level ) ;
31+ ( this . column . level !== 0 && ! this . findColumn ( 0 , this . visibleColumns ) ) ;
3332 }
3433
3534 get canNotMoveRight ( ) {
36- const nextIndex = this . grid . columns . indexOf ( this . column ) + 1 ;
3735 return this . column . visibleIndex === this . visibleColumns . length - 1 ||
38- ( this . column . level !== 0 && this . grid . columns [ nextIndex ] && this . grid . columns [ nextIndex ] . level !== this . column . level ) ;
36+ ( this . column . level !== 0 && ! this . findColumn ( 1 , this . visibleColumns ) ) ;
3937 }
4038
4139 public onMoveButtonClicked ( moveDirection ) {
@@ -66,7 +64,12 @@ export class IgxExcelStyleColumnMovingComponent {
6664 }
6765 }
6866 } else {
69- return columns [ index + 1 ] ;
67+ while ( index < columns . length - 1 ) {
68+ index ++ ;
69+ if ( columns [ index ] . level === this . column . level && columns [ index ] . parent === this . column . parent ) {
70+ return columns [ index ] ;
71+ }
72+ }
7073 }
7174 }
7275}
You can’t perform that action at this time.
0 commit comments