Skip to content

Commit

Permalink
Merge pull request #2614 from tugcekucukoglu/data-drag-drop
Browse files Browse the repository at this point in the history
Fixed #2225 - [BUG] DataTable column reorder in wrong order
  • Loading branch information
tugcekucukoglu authored Jun 2, 2022
2 parents 319df1e + 855d63a commit 66e9045
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/datatable/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ export default {
let dragIndex = DomHandler.index(this.draggedColumn);
let dropIndex = DomHandler.index(this.findParentHeader(event.target));
let allowDrop = (dragIndex !== dropIndex);
if (allowDrop && ((dropIndex - dragIndex === 1 && this.dropPosition === -1) || (dragIndex - dropIndex === 1 && this.dropPosition === 1))) {
if (allowDrop && ((dropIndex - dragIndex === 1 && this.dropPosition === -1) || (dropIndex - dragIndex === -1 && this.dropPosition === 1))) {
allowDrop = false;
}
Expand Down

0 comments on commit 66e9045

Please sign in to comment.