Fixed an issue that occurred when you try to download table data as CSV with multiple headers and Colspan greater than 3. It caused column header alignment problem when I export out. (#1373)

This commit is contained in:
Ruchir Patel 2017-03-30 12:24:40 -07:00 committed by Rob Garrison
parent 829e5a62b5
commit c6db0bc75d

View File

@ -85,7 +85,7 @@
colspanLen = parseInt( $cell.attr('colspan'), 10) - 1; colspanLen = parseInt( $cell.attr('colspan'), 10) - 1;
// allow data-attribute to be an empty string // allow data-attribute to be an empty string
txt = output.formatData( c, wo, $cell, isHeader ); txt = output.formatData( c, wo, $cell, isHeader );
for (col = 1; col <= colspanLen; col++) { for (col = 0; col < colspanLen; col++) {
// if we're processing the header & making JSON, the header names need to be unique // if we're processing the header & making JSON, the header names need to be unique
if ($cell.filter('[rowspan]').length) { if ($cell.filter('[rowspan]').length) {
rowspanLen = parseInt( $cell.attr('rowspan'), 10); rowspanLen = parseInt( $cell.attr('rowspan'), 10);