ui-kit-ck-consultant 0.6.40 → 0.6.42
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 +11 -13
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11 -13
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -911,21 +911,18 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
911
911
|
});
|
912
912
|
|
913
913
|
if (thead) {
|
914
|
-
var headerRow = _this.getArray(thead.props.children).
|
914
|
+
var headerRow = _this.getArray(thead.props.children).find(function (row) {
|
915
915
|
return row.type.name === 'Tr';
|
916
916
|
});
|
917
917
|
|
918
|
-
console.log('headerRow 1', headerRow);
|
919
|
-
console.log('headerRow 2', _this.getArray(headerRow));
|
920
|
-
|
921
918
|
if (headerRow) {
|
922
|
-
_this.getArray(headerRow).
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
919
|
+
var headers = _this.getArray(headerRow.props.children).flatMap(function (row) {
|
920
|
+
return _this.getArray(row.props.children);
|
921
|
+
}).map(function (th) {
|
922
|
+
return th.props && th.props.children ? _this.extractText(th.props.children) : '';
|
923
|
+
}).join(';');
|
924
|
+
|
925
|
+
dataCSV += headers + '\n';
|
929
926
|
}
|
930
927
|
}
|
931
928
|
|
@@ -936,9 +933,10 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
936
933
|
|
937
934
|
if (bodyRow) {
|
938
935
|
_this.getArray(bodyRow).forEach(function (row) {
|
939
|
-
var body = row.props.children
|
940
|
-
return
|
936
|
+
var body = _this.getArray(row.props.children).map(function (td) {
|
937
|
+
return td.props && td.props.children ? _this.extractText(td.props.children) : '';
|
941
938
|
}).join(';');
|
939
|
+
|
942
940
|
dataCSV += body + '\n';
|
943
941
|
});
|
944
942
|
}
|