mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
don't emit table drag if the position diden't change
This commit is contained in:
parent
efa043ed35
commit
439d105858
1 changed files with 5 additions and 2 deletions
|
@ -108,7 +108,10 @@ function dragDropRow() {
|
|||
data.splice(draggedRow, 1);
|
||||
data.splice(draggedOverRow, 0, row);
|
||||
data = data;
|
||||
emit('draggedRow', draggedRow, draggedOverRow);
|
||||
// Don't emit if we are at the same spot
|
||||
if (draggedRow !== draggedOverRow){
|
||||
emit('draggedRow', draggedRow, draggedOverRow);
|
||||
}
|
||||
}
|
||||
|
||||
// Reset Drag & Remove Selection
|
||||
|
@ -160,4 +163,4 @@ function dragDropRow() {
|
|||
.dragged-over-after { border-bottom: 0.25rem solid var(--cl-fg); }
|
||||
|
||||
tr { cursor: grab; }
|
||||
</style>
|
||||
</style>
|
||||
|
|
Loading…
Add table
Reference in a new issue