ui-kit-ck-consultant 0.6.61 → 0.6.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -891,19 +891,14 @@ var Table = /*#__PURE__*/function (_React$Component) {
891
891
  var dataCSV = '';
892
892
 
893
893
  if (_this.props.data) {
894
- Object.keys(_this.props.data).forEach(function (key) {
895
- var rowData = _this.props.data[key].map(function (cell) {
896
- return cell ? _this.extractText(cell) : '';
897
- }).join(';');
894
+ var headers = Object.keys(_this.props.data[0]);
895
+ dataCSV += headers.join(';') + '\n';
898
896
 
899
- dataCSV += rowData + '\n';
900
- });
901
-
902
- _this.props.data.map(function (row) {
903
- var rowData = row.map(function (cell) {
904
- return cell ? _this.extractText(cell) : '';
905
- }).join(';');
906
- dataCSV += rowData + '\n';
897
+ _this.props.data.forEach(function (row) {
898
+ var values = headers.map(function (key) {
899
+ return row[key] !== undefined ? row[key] : '';
900
+ });
901
+ dataCSV += values.join(';') + '\n';
907
902
  });
908
903
  } else {
909
904
  console.log('this.props', _this.props);