Commit 62444292 authored by baiyaaaaa's avatar baiyaaaaa Committed by GitHub

Merge pull request #2207 from reverland/fix-safari-colgroup

table: wrap col in colgroup to make column width work in safari
parents 634a4157 a3da1613
...@@ -28,6 +28,7 @@ export default { ...@@ -28,6 +28,7 @@ export default {
cellspacing="0" cellspacing="0"
cellpadding="0" cellpadding="0"
border="0"> border="0">
<colgroup>
{ {
this._l(this.columns, column => this._l(this.columns, column =>
<col <col
...@@ -35,6 +36,7 @@ export default { ...@@ -35,6 +36,7 @@ export default {
width={ column.realWidth || column.width } width={ column.realWidth || column.width }
/>) />)
} }
</colgroup>
<tbody> <tbody>
{ {
this._l(this.data, (row, $index) => this._l(this.data, (row, $index) =>
......
...@@ -78,6 +78,7 @@ export default { ...@@ -78,6 +78,7 @@ export default {
cellspacing="0" cellspacing="0"
cellpadding="0" cellpadding="0"
border="0"> border="0">
<colgroup>
{ {
this._l(this.columns, column => this._l(this.columns, column =>
<col <col
...@@ -90,6 +91,7 @@ export default { ...@@ -90,6 +91,7 @@ export default {
? <col name="gutter" width={ this.layout.scrollY ? this.layout.gutterWidth : '' }></col> ? <col name="gutter" width={ this.layout.scrollY ? this.layout.gutterWidth : '' }></col>
: '' : ''
} }
</colgroup>
<thead> <thead>
{ {
this._l(columnRows, (columns, rowIndex) => this._l(columnRows, (columns, rowIndex) =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment