ui-kit-ck-consultant 0.5.306 → 0.5.308

Sign up to get free protection for your applications and to get access to all the features.
@@ -144,7 +144,23 @@ var Modal = /*#__PURE__*/function (_React$Component) {
144
144
  icon: faCheck
145
145
  }) : ''), !this.props.disableClose ? /*#__PURE__*/React.createElement("div", {
146
146
  className: style.modal_close,
147
- onClick: this.props.onClose
147
+ onClick: function onClick() {
148
+ if (_this2.props.closeMessage) {
149
+ if (window.confirmCustom) {
150
+ window.confirmCustom(_this2.props.closeMessage), function () {
151
+ if (result) {
152
+ _this2.props.onClose();
153
+ }
154
+ };
155
+ } else {
156
+ if (window.confirm(_this2.props.closeMessage)) {
157
+ _this2.props.onClose();
158
+ }
159
+ }
160
+ } else {
161
+ _this2.props.onClose();
162
+ }
163
+ }
148
164
  }, this.props.iconClose ? this.props.iconClose : /*#__PURE__*/React.createElement(FontAwesomeIcon, {
149
165
  icon: faTimes
150
166
  })) : null), /*#__PURE__*/React.createElement("div", {
@@ -707,7 +723,7 @@ var FormSelectMultiples = /*#__PURE__*/function (_React$Component) {
707
723
  };
708
724
 
709
725
  _this.detectClickOutside = function (event) {
710
- if (!_this.containerRef.current.contains(event.target)) {
726
+ if (_this.refComponent && _this.refComponent.current && !_this.containerRef.current.contains(event.target)) {
711
727
  _this.setState({
712
728
  isDisplay: false
713
729
  });