intelicoreact 1.3.38 → 1.3.40

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.
@@ -72,7 +72,7 @@ const Dropdown = _ref => {
72
72
  const {
73
73
  isMobile: isMobileProp
74
74
  } = (0, _useIsMobile.default)();
75
- const isMobile = isMobileProp && withMobileLogic;
75
+ const isMobile = isMobileProp && withMobileLogic && window.screen.width < 768;
76
76
  const [dropdownId, setDropdownId] = (0, _react.useState)(id || fieldKey || Math.random().toString(16).slice(2));
77
77
  const [isOpen, setIsOpen] = (0, _react.useState)(false);
78
78
  const [searchValue, setSearchValue] = (0, _react.useState)();
@@ -192,8 +192,8 @@ const Dropdown = _ref => {
192
192
  const handleClickOutside = event => {
193
193
  var _getListContainer;
194
194
 
195
- if (!((_getListContainer = getListContainer()) !== null && _getListContainer !== void 0 && _getListContainer.contains(event === null || event === void 0 ? void 0 : event.target))) {
196
- toggleList(event);
195
+ if (!((_getListContainer = getListContainer()) !== null && _getListContainer !== void 0 && _getListContainer.contains(event === null || event === void 0 ? void 0 : event.target)) && !(dropdownRef !== null && dropdownRef !== void 0 && dropdownRef.current.contains(event === null || event === void 0 ? void 0 : event.target))) {
196
+ setIsOpen(false);
197
197
  }
198
198
  };
199
199
 
@@ -83,7 +83,7 @@ const TagsDropdown = _ref => {
83
83
  const {
84
84
  isMobile: isMobileProp
85
85
  } = (0, _useIsMobile.default)();
86
- const isMobile = isMobileProp && withMobileLogic;
86
+ const isMobile = isMobileProp && withMobileLogic && window.screen.width < 768;
87
87
  const [dropdownId, setDropdownId] = (0, _react.useState)(id || fieldKey || Math.random().toString(16).slice(2));
88
88
  const [isOpen, setIsOpen] = (0, _react.useState)(false);
89
89
  const [searchValue, setSearchValue] = (0, _react.useState)("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.3.38",
3
+ "version": "1.3.40",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [