From c6db0bc75d9d04e2c5abf0c5a53d84ef8f38838c Mon Sep 17 00:00:00 2001 From: Ruchir Patel Date: Thu, 30 Mar 2017 12:24:40 -0700 Subject: [PATCH] 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) --- js/widgets/widget-output.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/widgets/widget-output.js b/js/widgets/widget-output.js index 7d6fa629..3908392c 100644 --- a/js/widgets/widget-output.js +++ b/js/widgets/widget-output.js @@ -85,7 +85,7 @@ colspanLen = parseInt( $cell.attr('colspan'), 10) - 1; // allow data-attribute to be an empty string 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 ($cell.filter('[rowspan]').length) { rowspanLen = parseInt( $cell.attr('rowspan'), 10);