ui-kit-ck-consultant 0.5.246 → 0.5.248

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
@@ -731,7 +731,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
731
731
  }
732
732
  };
733
733
 
734
- _this.getCSV = function () {
734
+ _this.getCSV = function (callback) {
735
735
  var dataCSV = '';
736
736
 
737
737
  if (_this.props && _this.props.children) {
@@ -758,6 +758,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
758
758
  link.href = "data:text/csv;charset=utf-8,\uFEFF" + encodeURIComponent(dataCSV);
759
759
  link.download = _this.props.nameCSV || 'file.csv';
760
760
  link.click();
761
+ callback();
761
762
  };
762
763
 
763
764
  return _this;
@@ -775,8 +776,18 @@ var Table = /*#__PURE__*/function (_React$Component) {
775
776
  }, /*#__PURE__*/React__default.createElement(Button, {
776
777
  text: "T\xE9l\xE9charger CSV",
777
778
  className: "w-auto ml-auto mb-10",
778
- onClick: function onClick() {
779
- return _this2.getCSV();
779
+ onClick: function onClick(callback) {
780
+ if (callback === void 0) {
781
+ callback = function callback() {};
782
+ }
783
+
784
+ if (_this2.props.getAllData) {
785
+ _this2.props.getAllData(function () {
786
+ return _this2.getCSV(callback);
787
+ });
788
+ } else {
789
+ _this2.getCSV(callback);
790
+ }
780
791
  }
781
792
  })) : null, /*#__PURE__*/React__default.createElement("table", {
782
793
  className: tableClass,