fix(table): TableHeader get wrong width, when column width props is String type

keep same type(String/Number) with Table width props
This commit is contained in:
Haven 2018-05-25 10:43:37 +08:00 committed by GitHub
parent ece49d8038
commit a18ffad6cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -834,6 +834,7 @@
columns.forEach((column, index) => { columns.forEach((column, index) => {
column._index = index; column._index = index;
column._columnKey = columnKey++; column._columnKey = columnKey++;
column.width = parseInt(column.width);
column._width = column.width ? column.width : ''; // update in handleResize() column._width = column.width ? column.width : ''; // update in handleResize()
column._sortType = 'normal'; column._sortType = 'normal';
column._filterVisible = false; column._filterVisible = false;