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