mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 08:20:39 +01:00
fix(Table): prevent @select event call when selecting all rows (#838)
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user