Fix table.isFixed (#2529)
This commit is contained in:
parent
864c396006
commit
e07cb5a9a9
@ -21,8 +21,8 @@ function Table ({ children, className, empty, filter, header, isFixed }: TablePr
|
||||
const isEmpty = !children || (Array.isArray(children) && children.length === 0);
|
||||
|
||||
return (
|
||||
<div className={`ui--Table ${isFixed && 'isFixed'} ${className}`}>
|
||||
<table>
|
||||
<div className={`ui--Table ${className}`}>
|
||||
<table className={`${isFixed && 'isFixed'}`}>
|
||||
<Head
|
||||
filter={filter}
|
||||
header={header}
|
||||
@ -50,6 +50,10 @@ export default React.memo(styled(Table)`
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
|
||||
&.isFixed {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
tr {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
@ -76,9 +80,5 @@ export default React.memo(styled(Table)`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.isFixed table {
|
||||
table-layout: fixed;
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user