ui-kit-ck-consultant 0.6.38 → 0.6.40

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
@@ -914,16 +914,21 @@ var Table = /*#__PURE__*/function (_React$Component) {
914
914
  });
915
915
 
916
916
  if (thead) {
917
- var headerRow = _this.getArray(thead.props.children).find(function (row) {
917
+ var headerRow = _this.getArray(thead.props.children).filter(function (row) {
918
918
  return row.type.name === 'Tr';
919
919
  });
920
920
 
921
- if (headerRow) {
922
- var headers = _this.getArray(headerRow.props.children)[0].props.children[0].map(function (th) {
923
- return th.props && th.props.children ? _this.extractText(th.props.children) : '';
924
- }).join(';');
921
+ console.log('headerRow 1', headerRow);
922
+ console.log('headerRow 2', _this.getArray(headerRow));
925
923
 
926
- dataCSV += headers + '\n';
924
+ if (headerRow) {
925
+ _this.getArray(headerRow).forEach(function (row) {
926
+ console.log('row', row);
927
+ var header = row.props.children[0].map(function (th) {
928
+ return th.props && th.props.children ? _this.extractText(th.props.children) : '';
929
+ }).join(';');
930
+ dataCSV += header + '\n';
931
+ });
927
932
  }
928
933
  }
929
934
 
@@ -934,8 +939,6 @@ var Table = /*#__PURE__*/function (_React$Component) {
934
939
 
935
940
  if (bodyRow) {
936
941
  _this.getArray(bodyRow).forEach(function (row) {
937
- console.log('1', row.props.children);
938
- console.log('2', row.props.children[0]);
939
942
  var body = row.props.children[0].map(function (th) {
940
943
  return th.props && th.props.children ? _this.extractText(th.props.children) : '';
941
944
  }).join(';');