fix(Table): prevent @select event call when selecting all rows (#838)

This commit is contained in:
mwohlan
2023-10-20 12:48:05 +02:00
committed by GitHub
parent cca9dfbe22
commit 51f4d54999

View File

@@ -250,12 +250,12 @@ export default defineComponent({
function selectAllRows () {
props.rows.forEach((row) => {
// If the row is already selected, don't select it again
if (selected.value.some((item) => compare(toRaw(item), toRaw(row)))) {
if (isSelected(row)) {
return
}
// @ts-ignore
$attrs.onSelect ? $attrs.onSelect(row) : selected.value.push(row)
selected.value.push(row)
})
}