Merge pull request #2614 from tugcekucukoglu/data-drag-drop

Fixed #2225 - [BUG] DataTable column reorder in wrong order
pull/2621/head
Tuğçe Küçükoğlu 2022-06-02 16:04:22 +03:00 committed by GitHub
commit 66e90451c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}