0
0
Fork 0

fix: refs #8078 improve handleSelection

This commit is contained in:
Jorge Penadés 2024-10-29 09:56:06 +01:00
parent 19a7e52605
commit e39f85ff4b
1 changed files with 5 additions and 2 deletions

View File

@ -335,10 +335,13 @@ function handleScroll() {
function handleSelection({ evt, added, rows: selectedRows }, rows) {
if (evt?.shiftKey && added) {
const rowIndex = selectedRows[0].$index;
selected.value.length = 0;
const selectedIndexes = new Set(selected.value.map((row) => row.$index));
for (const row of rows) {
if (row.$index == rowIndex) break;
selected.value.push(row);
if (!selectedIndexes.has(row.$index)) {
selected.value.push(row);
selectedIndexes.add(row.$index);
}
}
}
}