Grid column manager "move to last visible" now moves the column
correctly to the last visible slot instead of one slot after the last
visible slot.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
if (column.visible) lastVisible = idx;
}
);
- targetIdx = lastVisible + 1;
+
+ // When moving a column (down) causes one or more
+ // visible columns to shuffle forward, our column
+ // moves into the slot of the last visible column.
+ // Otherwise, put it into the slot directly following
+ // the last visible column.
+ targetIdx =
+ srcIdx < lastVisible ? lastVisible : lastVisible + 1;
}
// Splice column out of old position, insert at new position.