intelicoreact 1.1.33 → 1.1.35

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.
@@ -44,7 +44,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
44
44
  var RC = 'dropdown';
45
45
 
46
46
  var Dropdown = function Dropdown(_ref) {
47
- var _options$find, _window, _filteredOptions$find;
47
+ var _options$find, _filteredOptions$find;
48
48
 
49
49
  var _ref$options = _ref.options,
50
50
  options = _ref$options === void 0 ? [] : _ref$options,
@@ -396,7 +396,7 @@ var Dropdown = function Dropdown(_ref) {
396
396
  });
397
397
  };
398
398
 
399
- var closeList = handleClickOutside;
399
+ var closeList = isOpen ? handleClickOutside : function () {};
400
400
  (0, _react.useEffect)(function () {
401
401
  initListContainer();
402
402
  }, []);
@@ -435,9 +435,6 @@ var Dropdown = function Dropdown(_ref) {
435
435
  if (scrollReactionObj && (0, _typeof2.default)(scrollReactionObj) === 'object') removeEventListener('scroll', doScrollCallback);
436
436
  };
437
437
  }, [isOpen, dropdownListRef]);
438
- (0, _react.useEffect)(function () {
439
- closeList();
440
- }, [(_window = window) === null || _window === void 0 ? void 0 : _window.scrollY]);
441
438
 
442
439
  var onKeyDown = function onKeyDown(e) {
443
440
  if (![9, 13].includes(e.keyCode)) return false;
@@ -99,10 +99,10 @@ var Modal = function Modal(_ref2) {
99
99
  }
100
100
  };
101
101
  (0, _react.useEffect)(function () {
102
- if (submitOnEnter) document.addEventListener('keyup', handle.pressKey);
102
+ if (submitOnEnter) document.addEventListener('keyup', handle.pressEnter);
103
103
  if (closeOnEsc) document.addEventListener('keyup', handle.pressEsc);
104
104
  return function () {
105
- document.removeEventListener('keyup', handle.pressKey);
105
+ document.removeEventListener('keyup', handle.pressEnter);
106
106
  document.removeEventListener('keyup', handle.pressEsc);
107
107
  };
108
108
  }, [submitOnEnter, closeOnEsc]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.1.33",
3
+ "version": "1.1.35",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [