Add drag and drop to Travel Extra Community table #189

Merged
alexm merged 12 commits from :feature/ExtraCommunityDragAndDrop into dev 2024-02-20 10:40:40 +00:00
1 changed files with 8 additions and 1 deletions
Showing only changes of commit fbe8c912f6 - Show all commits

View File

@ -306,7 +306,13 @@ const moveRow = async (draggedRowIndex, targetRowIndex, entryIndex) => {
};
const handleDrop = () => {
if (!draggedRowIndex.value && !targetRowIndex.value) return;
if (
!draggedRowIndex.value &&
draggedRowIndex.value !== 0 &&
!targetRowIndex.value &&
draggedRowIndex.value !== 0
)
return;
moveRow(draggedRowIndex.value, targetRowIndex.value, entryRowIndex.value);
cleanDragAndDropData();
};
@ -357,6 +363,7 @@ const cleanDragAndDropData = () => {
:pagination="{ rowsPerPage: 0 }"
class="full-width"
table-style="user-select: none;"
@dragend="cleanDragAndDropData()"
>
<template #body="props">
<QTr