Skip to content

Commit 17390a0

Browse files
committed
Merge branch 'hkaya-master'
2 parents f05772d + 2a644cc commit 17390a0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/TableBody.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,16 @@ class TableBody extends Component {
157157
}
158158
}
159159
const theader = this.props.columns.map(function(column, i) {
160-
const width = column.width === null ? column.width : parseInt(column.width, 10);
161160
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;
165166
/** add min-wdth to fix user assign column width
166167
not eq offsetWidth in large column table **/
167-
};
168+
style.minWidth = width;
169+
}
168170
return (<col style={ style } key={ i } className={ column.className }></col>);
169171
});
170172

0 commit comments

Comments
 (0)