ui-kit-ck-consultant 0.6.25 → 0.6.27
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 +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +8 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -882,6 +882,8 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
882
882
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
883
883
|
|
884
884
|
_this.getArray = function (data) {
|
885
|
+
console.log('Array', Array.isArray(data), data);
|
886
|
+
|
885
887
|
if (data && Array.isArray(data)) {
|
886
888
|
return data;
|
887
889
|
} else if (data) {
|
@@ -921,7 +923,9 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
921
923
|
console.log(headerRow);
|
922
924
|
|
923
925
|
if (headerRow) {
|
924
|
-
var headers = _this.getArray(headerRow.props.children).
|
926
|
+
var headers = _this.getArray(headerRow.props.children).find(function (row) {
|
927
|
+
return ['Th', 'Td'].includes(row.type.name);
|
928
|
+
}).map(function (th) {
|
925
929
|
console.log(_this.extractText(th.props.children), th.props.children);
|
926
930
|
return th.props && th.props.children ? _this.extractText(th.props.children) : '';
|
927
931
|
}).join(';');
|
@@ -933,7 +937,9 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
933
937
|
if (tbody) {
|
934
938
|
_this.getArray(tbody.props.children).forEach(function (row) {
|
935
939
|
if (row.type === 'Tr') {
|
936
|
-
var rowData = _this.getArray(row.props.children).
|
940
|
+
var rowData = _this.getArray(row.props.children).find(function (row) {
|
941
|
+
return ['Th', 'Td'].includes(row.type.name);
|
942
|
+
}).map(function (td) {
|
937
943
|
return td.props && td.props.children ? _this.extractText(td.props.children) : '';
|
938
944
|
}).join(';');
|
939
945
|
|