Fix table.isFixed (#2529)

This commit is contained in:
Jaco Greeff 2020-04-07 17:55:20 +02:00 committed by GitHub
parent 864c396006
commit e07cb5a9a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}
`);