Browse Source

fix: table ssr has invaild style #231

pull/263/head
tangjinzhou 6 years ago
parent
commit
4b24c13544
  1. 2
      components/vc-table/src/ColGroup.jsx
  2. 4
      components/vc-table/src/TableHeaderRow.jsx

2
components/vc-table/src/ColGroup.jsx

@ -34,7 +34,7 @@ export default {
return (
<col
key={c.key || c.dataIndex}
style={{ width, minWidth: width }}
style={width ? { width, minWidth: width } : {}}
/>
)
})

4
components/vc-table/src/TableHeaderRow.jsx

@ -21,7 +21,9 @@ const TableHeaderRow = {
const rowProps = customHeaderRow(row.map(cell => cell.column), index)
const customStyle = rowProps ? rowProps.style : {}
const style = { height, ...customStyle }
if (style.height === null) {
delete style.height
}
return (
<HeaderRow {...rowProps} style={style}>
{row.map((cell, i) => {

Loading…
Cancel
Save