chore(components): [table] filter out invalid className (#6717)

* chore(components): [table] filter out invalid className

* chore(components): [table] modify codes by comments
This commit is contained in:
Yuyao Nie 2022-03-23 23:22:42 +08:00 committed by GitHub
parent e179ee6960
commit 1db4ae09ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ function useStyles<T>(props: Partial<TableBodyProps<T>>) {
)
}
classes.push(ns.e('cell'))
return classes.join(' ')
return classes.filter((className) => Boolean(className)).join(' ')
}
const getSpan = (
row: T,

View File

@ -109,7 +109,7 @@ function useStyle<T>(props: TableHeaderProps<T>) {
classes.push(ns.e('cell'))
return classes.join(' ')
return classes.filter((className) => Boolean(className)).join(' ')
}
return {