ui-kit-ck-consultant 0.6.32 → 0.6.34

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.
package/dist/index.js CHANGED
@@ -919,10 +919,6 @@ var Table = /*#__PURE__*/function (_React$Component) {
919
919
  });
920
920
 
921
921
  if (headerRow) {
922
- console.log('headerRow 1', headerRow);
923
- console.log('headerRow 2', _this.getArray(headerRow.props.children));
924
- console.log('headerRow 3', _this.getArray(headerRow.props.children)[0]);
925
-
926
922
  var headers = _this.getArray(headerRow.props.children)[0].props.children[0].map(function (th) {
927
923
  return th.props && th.props.children ? _this.extractText(th.props.children) : '';
928
924
  }).join(';');
@@ -932,15 +928,21 @@ var Table = /*#__PURE__*/function (_React$Component) {
932
928
  }
933
929
 
934
930
  if (tbody) {
935
- _this.getArray(tbody.props.children).forEach(function (row) {
936
- if (row.type === 'Tr') {
937
- var rowData = _this.getArray(row.props.children)[0].props.children[0].map(function (td) {
938
- return td.props && td.props.children ? _this.extractText(td.props.children) : '';
939
- }).join(';');
940
-
941
- dataCSV += rowData + '\n';
942
- }
931
+ var bodyRow = _this.getArray(tbody.props.children).find(function (row) {
932
+ return row.type.name === 'Tr';
943
933
  });
934
+
935
+ console.log('tbody 1', bodyRow);
936
+ console.log('tbody 2', _this.getArray(bodyRow.props.children));
937
+ console.log('tbody 3', _this.getArray(bodyRow.props.children)[0]);
938
+
939
+ if (bodyRow) {
940
+ var body = _this.getArray(bodyRow.props.children)[0].props.children[0].map(function (th) {
941
+ return th.props && th.props.children ? _this.extractText(th.props.children) : '';
942
+ }).join(';');
943
+
944
+ dataCSV += body + '\n';
945
+ }
944
946
  }
945
947
  }
946
948
  }