ui-kit-ck-consultant 0.6.26 → 0.6.28

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
@@ -923,7 +923,14 @@ var Table = /*#__PURE__*/function (_React$Component) {
923
923
  console.log(headerRow);
924
924
 
925
925
  if (headerRow) {
926
- var headers = _this.getArray(headerRow.props.children).map(function (th) {
926
+ console.log('headers', _this.getArray(headerRow.props.children).find(function (row) {
927
+ console.log(row.type.name);
928
+ return ['Th', 'Td'].includes(row.type.name);
929
+ }));
930
+
931
+ var headers = _this.getArray(headerRow.props.children).find(function (row) {
932
+ return ['Th', 'Td'].includes(row.type.name);
933
+ }).map(function (th) {
927
934
  console.log(_this.extractText(th.props.children), th.props.children);
928
935
  return th.props && th.props.children ? _this.extractText(th.props.children) : '';
929
936
  }).join(';');
@@ -935,7 +942,9 @@ var Table = /*#__PURE__*/function (_React$Component) {
935
942
  if (tbody) {
936
943
  _this.getArray(tbody.props.children).forEach(function (row) {
937
944
  if (row.type === 'Tr') {
938
- var rowData = _this.getArray(row.props.children).map(function (td) {
945
+ var rowData = _this.getArray(row.props.children).find(function (row) {
946
+ return ['Th', 'Td'].includes(row.type.name);
947
+ }).map(function (td) {
939
948
  return td.props && td.props.children ? _this.extractText(td.props.children) : '';
940
949
  }).join(';');
941
950