From 77cb2d84be6cb11f02effc49371a0ac70e580df2 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 29 Oct 2024 09:38:40 +0100 Subject: [PATCH] fix: refs #8078 handleSelection --- src/components/VnTable/VnTable.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 74a96e0e3..a15ba2f47 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -335,8 +335,9 @@ function handleScroll() { function handleSelection({ evt, added, rows: selectedRows }, rows) { if (evt?.shiftKey && added) { const rowIndex = selectedRows[0].$index; + selected.value.length = 0; for (const row of rows) { - if (row.$index > rowIndex) break; + if (row.$index == rowIndex) break; selected.value.push(row); } } @@ -440,7 +441,6 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) { :virtual-scroll="isTableMode" @virtual-scroll="handleScroll" @row-click="(_, row) => rowClickFunction && rowClickFunction(row)" - @update:selected="emit('update:selected', $event)" @selection="(details) => handleSelection(details, rows)" >