mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-17 11:49:41 +08:00
fix(components): [table] toggleRowExpansion typing (#9512)
This commit is contained in:
parent
93631d841e
commit
5f39b8950c
@ -453,7 +453,7 @@ function useWatcher<T>() {
|
||||
}
|
||||
|
||||
// 展开行与 TreeTable 都要使用
|
||||
const toggleRowExpansionAdapter = (row: T, expanded: boolean) => {
|
||||
const toggleRowExpansionAdapter = (row: T, expanded?: boolean) => {
|
||||
const hasExpandColumn = columns.value.some(({ type }) => type === 'expand')
|
||||
if (hasExpandColumn) {
|
||||
toggleRowExpansion(row, expanded)
|
||||
|
@ -21,7 +21,7 @@ function useUtils<T>(store: Store<T>) {
|
||||
const toggleAllSelection = () => {
|
||||
store.commit('toggleAllSelection')
|
||||
}
|
||||
const toggleRowExpansion = (row: T, expanded: boolean) => {
|
||||
const toggleRowExpansion = (row: T, expanded?: boolean) => {
|
||||
store.toggleRowExpansionAdapter(row, expanded)
|
||||
}
|
||||
const clearSort = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user