Skip to content

Commit 4b24c13

Browse files
committed
fix: table ssr has invaild style #231
1 parent 90d33b0 commit 4b24c13

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

components/vc-table/src/ColGroup.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default {
3434
return (
3535
<col
3636
key={c.key || c.dataIndex}
37-
style={{ width, minWidth: width }}
37+
style={width ? { width, minWidth: width } : {}}
3838
/>
3939
)
4040
})

components/vc-table/src/TableHeaderRow.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const TableHeaderRow = {
2121
const rowProps = customHeaderRow(row.map(cell => cell.column), index)
2222
const customStyle = rowProps ? rowProps.style : {}
2323
const style = { height, ...customStyle }
24-
24+
if (style.height === null) {
25+
delete style.height
26+
}
2527
return (
2628
<HeaderRow {...rowProps} style={style}>
2729
{row.map((cell, i) => {

0 commit comments

Comments
 (0)