File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -157,14 +157,16 @@ class TableBody extends Component {
157
157
}
158
158
}
159
159
const theader = this . props . columns . map ( function ( column , i ) {
160
- const width = column . width === null ? column . width : parseInt ( column . width , 10 ) ;
161
160
const style = {
162
- display : column . hidden ? 'none' : null ,
163
- width : width ,
164
- minWidth : width
161
+ display : column . hidden ? 'none' : null
162
+ } ;
163
+ if ( column . width ) {
164
+ const width = parseInt ( column . width , 10 ) ;
165
+ style . width = width ;
165
166
/** add min-wdth to fix user assign column width
166
167
not eq offsetWidth in large column table **/
167
- } ;
168
+ style . minWidth = width ;
169
+ }
168
170
return ( < col style = { style } key = { i } className = { column . className } > </ col > ) ;
169
171
} ) ;
170
172
You can’t perform that action at this time.
0 commit comments