diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue index 0cf3e04ca..5fd33a061 100644 --- a/src/pages/Travel/ExtraCommunity.vue +++ b/src/pages/Travel/ExtraCommunity.vue @@ -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()" >