File tree 1 file changed +13
-1
lines changed
src/features/move-columns/js
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 168
168
} ) ;
169
169
} ,
170
170
redrawColumnAtPosition : function ( grid , originalPosition , newPosition ) {
171
+ var columns = grid . columns ;
172
+
171
173
if ( originalPosition === newPosition ) {
172
174
return ;
173
175
}
174
176
175
- var columns = grid . columns ;
177
+ //check columns in between move-range to make sure they are visible columns
178
+ var i0 = Math . min ( originalPosition , newPosition ) ;
179
+ for ( i0 ; i0 < Math . max ( originalPosition , newPosition ) ; i0 ++ ) {
180
+ if ( columns [ i0 ] . visible ) {
181
+ break ;
182
+ }
183
+ }
184
+ if ( i0 === Math . max ( originalPosition , newPosition ) ) {
185
+ //no visible column found, column did not visibly move
186
+ return ;
187
+ }
176
188
177
189
var originalColumn = columns [ originalPosition ] ;
178
190
if ( originalColumn . colDef . enableColumnMoving ) {
You can’t perform that action at this time.
0 commit comments