ui-kit-ck-consultant 0.6.3 → 0.6.5

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.
@@ -922,18 +922,36 @@ var Table = /*#__PURE__*/function (_React$Component) {
922
922
  var dataCSV = '';
923
923
 
924
924
  function findStringChild(children) {
925
+ console.log('Analyzing:', children);
926
+
925
927
  if (typeof children === 'string') {
928
+ console.log('String found:', children);
926
929
  return children;
927
- } else if (Array.isArray(children)) {
930
+ }
931
+
932
+ if (Array.isArray(children)) {
928
933
  for (var _iterator = _createForOfIteratorHelperLoose(children), _step; !(_step = _iterator()).done;) {
929
934
  var child = _step.value;
930
935
  var result = findStringChild(child);
931
- if (result) return result;
936
+
937
+ if (result) {
938
+ return result;
939
+ }
932
940
  }
933
- } else if (React.isValidElement(children)) {
941
+ }
942
+
943
+ if (React.isValidElement(children)) {
934
944
  return findStringChild(children.props.children);
935
945
  }
936
946
 
947
+ if (children && typeof children === 'object' && 'toString' in children) {
948
+ var potentialString = children.toString();
949
+
950
+ if (typeof potentialString === 'string' && potentialString !== '[object Object]') {
951
+ return potentialString;
952
+ }
953
+ }
954
+
937
955
  return null;
938
956
  }
939
957
 
@@ -944,7 +962,14 @@ var Table = /*#__PURE__*/function (_React$Component) {
944
962
  if (line.props && line.props.children) {
945
963
  _this.getArray(line.props.children).forEach(function (column) {
946
964
  if (column.props && column.props.children) {
947
- dataCSV += findStringChild(column.props.children).toString() + ";";
965
+ var stringChild = findStringChild(column.props.children);
966
+ console.log(stringChild);
967
+
968
+ if (stringChild) {
969
+ dataCSV += stringChild + ";";
970
+ } else {
971
+ dataCSV += ';';
972
+ }
948
973
  } else {
949
974
  dataCSV += ';';
950
975
  }