From fbe8c912f60767cec05d6b7069b6e409b0fd6f68 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 14 Feb 2024 09:55:18 -0300 Subject: [PATCH] Fix dragend status --- src/pages/Travel/ExtraCommunity.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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()" >