fix: refs #8078 handleSelection
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
71420da586
commit
77cb2d84be
|
@ -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)"
|
||||
>
|
||||
<template #top-left v-if="!$props.withoutHeader">
|
||||
|
|
Loading…
Reference in New Issue