@jspreadsheet/autowidth
Advanced tools
Comparing version 2.2.0 to 2.2.1
11
index.js
/** | ||
* Plugin for auto width cols | ||
* | ||
* @version 2.2.0 | ||
* @version 2.2.1 | ||
* @author Guillaume Bonnaire <contact@gbonnaire.fr> | ||
@@ -140,3 +140,10 @@ * @website https://repo.gbonnaire.fr | ||
for(let ite_row=0; ite_row<worksheet.rows.length; ite_row++) { | ||
const valueRow = worksheet.getValueFromCoords(ite_td-1, ite_row, true); | ||
let valueRow = worksheet.getValueFromCoords(ite_td-1, ite_row, true); | ||
if(typeof valueRow !== "string") { | ||
if(valueRow === null) { | ||
valueRow = ""; | ||
} else { | ||
valueRow = "" + valueRow; | ||
} | ||
} | ||
if(worksheet.rows[ite_row].element == null) { | ||
@@ -143,0 +150,0 @@ width = Math.max(Math.ceil((valueRow.length / maxLength) * widthInit), width); |
@@ -31,3 +31,3 @@ { | ||
"main": "index.js", | ||
"version": "2.2.0" | ||
"version": "2.2.1" | ||
} |
14366
248