intelicoreact 1.2.97 → 1.2.99

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.
@@ -90,7 +90,7 @@ var Dropdown = function Dropdown(_ref) {
90
90
  isMobileProp = _useIsMobile.isMobile;
91
91
 
92
92
  var isMobile = isMobileProp && withMobileLogic;
93
- var dropdownId = id || fieldKey;
93
+ var dropdownId = id || fieldKey || Math.random().toString(16).slice(2);
94
94
 
95
95
  var _useState = (0, _react.useState)(false),
96
96
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -457,7 +457,7 @@ var Dropdown = function Dropdown(_ref) {
457
457
  return /*#__PURE__*/_react.default.createElement("div", {
458
458
  className: (0, _classnames.default)("".concat(RC, "__container-wrapper")),
459
459
  ref: wrapperRef,
460
- onClick: onWrapperClick
460
+ onClick: isMobile ? onWrapperClick : function () {}
461
461
  }, /*#__PURE__*/_react.default.createElement("div", {
462
462
  className: (0, _classnames.default)("".concat(RC, "__list-wrapper"), (_cn3 = {}, (0, _defineProperty2.default)(_cn3, "".concat(RC, "__list-wrapper--fixed-height"), isFixedMaxHeight), (0, _defineProperty2.default)(_cn3, "".concat(RC, "__list-wrapper--with-bottom-shadow"), isScrollableList && isMobile), (0, _defineProperty2.default)(_cn3, "".concat(RC, "__list-wrapper--with-bottom-shadow-hidden"), scrollTop === scrollHeight), _cn3)),
463
463
  ref: dropdownListWrapperRef
@@ -657,6 +657,13 @@ var Dropdown = function Dropdown(_ref) {
657
657
  setScrollHeight(parseInt((dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr9 = dropdownListRef.current) === null || _dropdownListRef$curr9 === void 0 ? void 0 : _dropdownListRef$curr9.scrollHeight) - (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr10 = dropdownListRef.current) === null || _dropdownListRef$curr10 === void 0 ? void 0 : _dropdownListRef$curr10.clientHeight)));
658
658
  }
659
659
  }, [scrollTop, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
660
+ (0, _react.useEffect)(function () {
661
+ return function () {
662
+ var _getListContainer7;
663
+
664
+ (_getListContainer7 = getListContainer()) === null || _getListContainer7 === void 0 ? void 0 : _getListContainer7.remove();
665
+ };
666
+ }, []);
660
667
  var postfixText = selectedLabel && ((_filteredOptions$find = filteredOptions.find(function (option) {
661
668
  return option.value === value;
662
669
  })) === null || _filteredOptions$find === void 0 ? void 0 : _filteredOptions$find.postfix) || null;
@@ -114,7 +114,7 @@ var TagsDropdown = function TagsDropdown(_ref) {
114
114
  isMobileProp = _useIsMobile.isMobile;
115
115
 
116
116
  var isMobile = isMobileProp && withMobileLogic;
117
- var dropdownId = fieldKey || id;
117
+ var dropdownId = fieldKey || id || Math.random().toString(16).slice(2);
118
118
 
119
119
  var _useState = (0, _react.useState)(false),
120
120
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -425,7 +425,7 @@ var TagsDropdown = function TagsDropdown(_ref) {
425
425
  return /*#__PURE__*/_react.default.createElement("div", {
426
426
  className: (0, _classnames.default)("".concat(RC, "__container-wrapper")),
427
427
  ref: wrapperRef,
428
- onClick: onWrapperClick
428
+ onClick: isMobile ? onWrapperClick : function () {}
429
429
  }, /*#__PURE__*/_react.default.createElement("div", {
430
430
  ref: dropdownListWrapperRef,
431
431
  className: (0, _classnames.default)("".concat(RC, "__selector-wrapper"), (0, _defineProperty2.default)({}, "".concat(RC, "__selector-wrapper--fixed-height"), isFixedMaxHeight && isMobile))
@@ -584,6 +584,13 @@ var TagsDropdown = function TagsDropdown(_ref) {
584
584
  setScrollHeight(parseInt((dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr9 = dropdownListRef.current) === null || _dropdownListRef$curr9 === void 0 ? void 0 : _dropdownListRef$curr9.scrollHeight) - (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr10 = dropdownListRef.current) === null || _dropdownListRef$curr10 === void 0 ? void 0 : _dropdownListRef$curr10.clientHeight)));
585
585
  }
586
586
  }, [scrollTop, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
587
+ (0, _react.useEffect)(function () {
588
+ return function () {
589
+ var _getListContainer4;
590
+
591
+ (_getListContainer4 = getListContainer()) === null || _getListContainer4 === void 0 ? void 0 : _getListContainer4.remove();
592
+ };
593
+ }, []);
587
594
  return /*#__PURE__*/_react.default.createElement("div", {
588
595
  className: (0, _classnames.default)(RC, className, (_cn8 = {}, (0, _defineProperty2.default)(_cn8, "".concat(RC, "_disabled"), disabled), (0, _defineProperty2.default)(_cn8, "".concat(RC, "-mobile"), isMobile), _cn8)),
589
596
  ref: dropdownRef
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.2.97",
3
+ "version": "1.2.99",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [