Please make sure each of the following is true before submitting a new issue. We are a small team with limited time and it is very difficult to manage issues if they aren't reported correctly.
If you have grouping enabled on a grid, moving columns will break when you try to move things to or from the end of the list. This is because a new invisible treeBaseHeader column is prepended to the list of columns, which is classified as a "nonMovableColumn" in the uiGridMoveColumnService.
Given the following example scenario...
- table with 7 columns, including the treeBaseHeader, and the last 3 columns are invisible.
- with 'Y' meaning a movable column and 'N' non-movable, the columns array looks like [N, Y, Y, Y, N, N, N]
- moving column from position 1 to position 3
- I'm assuming this should be considered a valid move
...here's where the error occurs in the moveColumn function:
if (originalPosition >= (columns.length - nonMovableColumns) || finalPosition >= (columns.length - nonMovableColumns)) {
gridUtil.logError('MoveColumn: Invalid values for originalPosition, finalPosition');
return;
}
That if-statement evaluates to if (1 >= (7 - 4) || 3 >= (7 - 4)). Since 3 >= (7-4), we get a false-positive error.
Please make sure each of the following is true before submitting a new issue. We are a small team with limited time and it is very difficult to manage issues if they aren't reported correctly.
Use Stack Overflow or Gitter for questions.
If you have grouping enabled on a grid, moving columns will break when you try to move things to or from the end of the list. This is because a new invisible treeBaseHeader column is prepended to the list of columns, which is classified as a "nonMovableColumn" in the uiGridMoveColumnService.
Given the following example scenario...
...here's where the error occurs in the moveColumn function:
That if-statement evaluates to if (1 >= (7 - 4) || 3 >= (7 - 4)). Since 3 >= (7-4), we get a false-positive error.