Skip to content

Commit

Permalink
fix: table select children
Browse files Browse the repository at this point in the history
  • Loading branch information
faga295 committed Oct 24, 2022
1 parent 31f713b commit 259cdf2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/components/table/src/util.ts
Expand Up @@ -251,10 +251,20 @@ export function toggleRowStatus<T>(

const addRow = () => {
statusArr.push(row)
if (row.children) {
row.children.forEach((item) => {
statusArr.push(item)
})
}
changed = true
}
const removeRow = () => {
statusArr.splice(index, 1)
if (row.children) {
row.children.forEach((item) => {
statusArr.splice(item, 1)
})
}
changed = true
}

Expand Down

0 comments on commit 259cdf2

Please sign in to comment.