react-data-export
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="0.6.0"></a> | ||
# [0.6.0](https://github.com/securedeveloper/react-data-export/compare/v0.5.0...v0.6.0) (2020-01-20) | ||
### Features | ||
* if the header has style then the style should be used ([855d37a](https://github.com/securedeveloper/react-data-export/commit/855d37a)) | ||
<a name="0.5.0"></a> | ||
@@ -7,0 +17,0 @@ # [0.5.0](https://github.com/securedeveloper/react-data-export/compare/v0.4.2...v0.5.0) (2018-09-24) |
@@ -74,3 +74,3 @@ 'use strict'; | ||
if ((typeof col === 'undefined' ? 'undefined' : _typeof(col)) === 'object') { | ||
colTitle = col.title; | ||
//colTitle = col.title; //moved to getHeaderCell | ||
columnsWidth.push(col.width || { wpx: 80 }); /* wch (chars), wpx (pixels) - e.g. [{wch:6},{wpx:50}] */ | ||
@@ -106,4 +106,4 @@ } | ||
var cell = {}; | ||
var headerCellStyle = { font: { bold: true } }; | ||
cell.v = v; | ||
var headerCellStyle = v.style ? v.style : { font: { bold: true } }; //if style is then use it | ||
cell.v = v.title; | ||
cell.t = 's'; | ||
@@ -110,0 +110,0 @@ cell.s = headerCellStyle; |
{ | ||
"name": "react-data-export", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "description": "A set of tools to export dataset from react to different formats.", |
@@ -61,3 +61,3 @@ import XLSX from "tempa-xlsx"; | ||
if (typeof col === 'object'){ | ||
colTitle = col.title; | ||
//colTitle = col.title; //moved to getHeaderCell | ||
columnsWidth.push(col.width || {wpx:80}); /* wch (chars), wpx (pixels) - e.g. [{wch:6},{wpx:50}] */ | ||
@@ -93,4 +93,4 @@ } | ||
var cell = {}; | ||
var headerCellStyle = {font: {bold: true}}; | ||
cell.v = v; | ||
var headerCellStyle = v.style ? v.style : { font: { bold: true } }; //if style is then use it | ||
cell.v = v.title; | ||
cell.t = 's'; | ||
@@ -97,0 +97,0 @@ cell.s = headerCellStyle; |
73237
32