don't emit table drag if the position diden't change

This commit is contained in:
Samuel Lorch 2024-07-30 23:42:39 +02:00
parent efa043ed35
commit 439d105858

View file

@ -108,8 +108,11 @@ function dragDropRow() {
data.splice(draggedRow, 1); data.splice(draggedRow, 1);
data.splice(draggedOverRow, 0, row); data.splice(draggedOverRow, 0, row);
data = data; data = data;
// Don't emit if we are at the same spot
if (draggedRow !== draggedOverRow){
emit('draggedRow', draggedRow, draggedOverRow); emit('draggedRow', draggedRow, draggedOverRow);
} }
}
// Reset Drag & Remove Selection // Reset Drag & Remove Selection
draggedRow = 0; draggedRow = 0;