Skip to content

Commit

Permalink
fix(Table): prevent @select event call when selecting all rows (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwohlan committed Oct 20, 2023
1 parent cca9dfb commit 51f4d54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/components/data/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
Expand Down

0 comments on commit 51f4d54

Please sign in to comment.