ui-kit-ck-consultant 0.5.239 → 0.5.241
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 +18 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +18 -8
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -734,19 +734,29 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
734
734
|
_this.getCSV = function () {
|
735
735
|
var dataCSV = '';
|
736
736
|
|
737
|
-
_this.
|
738
|
-
_this.getArray(
|
739
|
-
|
740
|
-
|
741
|
-
|
737
|
+
if (_this.props && _this.props.children) {
|
738
|
+
_this.getArray(_this.props.children).forEach(function (children) {
|
739
|
+
if (children.props && children.props.children) {
|
740
|
+
_this.getArray(children.props.children).forEach(function (line) {
|
741
|
+
if (line.props && line.props.children) {
|
742
|
+
_this.getArray(line.props.children).forEach(function (column) {
|
743
|
+
if (column.props && column.props.children) {
|
744
|
+
dataCSV += column.props.children.toString() + ";";
|
745
|
+
} else {
|
746
|
+
dataCSV += '';
|
747
|
+
}
|
748
|
+
});
|
742
749
|
|
743
|
-
|
750
|
+
dataCSV += '\n';
|
751
|
+
}
|
752
|
+
});
|
753
|
+
}
|
744
754
|
});
|
745
|
-
}
|
755
|
+
}
|
746
756
|
|
747
757
|
var link = document.createElement('a');
|
748
758
|
link.href = "data:text/csv;charset=utf-8," + encodeURIComponent(dataCSV);
|
749
|
-
link.download = 'file.csv';
|
759
|
+
link.download = _this.props.nameCSV || 'file.csv';
|
750
760
|
link.click();
|
751
761
|
};
|
752
762
|
|