Skip to content

Commit

Permalink
Merge pull request #30 from slertness/master
Browse files Browse the repository at this point in the history
fix:  table header style
  • Loading branch information
tangjinzhou authored Jun 4, 2018
2 parents 012b68f + 5ac461d commit 3d24b72
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions components/vc-table/src/TableHeaderRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ const TableHeaderRow = {
const { column, children, className, ...cellProps } = cell
const cls = cell.class || className
const customProps = column.customHeaderCell ? column.customHeaderCell(column) : {}
if (column.align) {
cellProps.style = { textAlign: column.align }
}

const headerCellProps = mergeProps({
attrs: {
...cellProps,
Expand All @@ -40,6 +38,11 @@ const TableHeaderRow = {
...customProps,
key: column.key || column.dataIndex || i,
})

if (column.align) {
headerCellProps.style = { textAlign: column.align }
}

if (typeof HeaderCell === 'function') {
return HeaderCell(h, headerCellProps, children)
}
Expand Down

0 comments on commit 3d24b72

Please sign in to comment.