intelicoreact 0.1.84 → 0.1.85

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.
@@ -60,7 +60,9 @@ var Modal = function Modal(_ref) {
60
60
  closeBtnIcon = _ref.closeBtnIcon,
61
61
  forced = _ref.forced,
62
62
  btnClassNames = _ref.btnClassNames,
63
- isCloseBtnIconPositionRight = _ref.isCloseBtnIconPositionRight;
63
+ isCloseBtnIconPositionRight = _ref.isCloseBtnIconPositionRight,
64
+ _ref$submitOnEnter = _ref.submitOnEnter,
65
+ submitOnEnter = _ref$submitOnEnter === void 0 ? true : _ref$submitOnEnter;
64
66
  if (!isOpen) return null;
65
67
 
66
68
  var renderModalTitle = function renderModalTitle() {
@@ -77,11 +79,12 @@ var Modal = function Modal(_ref) {
77
79
  }
78
80
  };
79
81
  (0, _react.useEffect)(function () {
82
+ if (!submitOnEnter) return false;
80
83
  document.addEventListener('keydown', handle.pressKey);
81
84
  return function () {
82
85
  return document.removeEventListener('keydown', handle.pressKey);
83
86
  };
84
- }, []);
87
+ }, [submitOnEnter]);
85
88
  return /*#__PURE__*/_react.default.createElement("div", {
86
89
  className: "modal-box j5"
87
90
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -116,7 +119,8 @@ var Modal = function Modal(_ref) {
116
119
  label: closeBtnText || 'Cancel',
117
120
  disabled: closeBtnDisable,
118
121
  icon: closeBtnIcon,
119
- isIconRight: isCloseBtnIconPositionRight
122
+ isIconRight: isCloseBtnIconPositionRight,
123
+ tabIndex: 1
120
124
  }), !noConfirmBtn && /*#__PURE__*/_react.default.createElement(_Button.default, {
121
125
  onClick: function onClick() {
122
126
  return handle.confirm();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.1.84",
3
+ "version": "0.1.85",
4
4
  "description": "hotfix/InputMaskOnChange | Add Possibility To Revert Clear Value and Masked Value in OnChange Callback",
5
5
  "main": "dist/index.js",
6
6
  "files": [