@dhis2-ui/button 9.9.0-alpha.1 → 9.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -87,9 +87,8 @@ class DropdownButton extends _react.Component {
87
87
  _defineProperty(this, "anchorRef", /*#__PURE__*/_react.default.createRef());
88
88
 
89
89
  _defineProperty(this, "handleKeyDown", event => {
90
- event.preventDefault();
91
-
92
90
  if (event.key === 'Escape' && this.state.open) {
91
+ event.preventDefault();
93
92
  event.stopPropagation();
94
93
  this.setState({
95
94
  open: false
@@ -51,9 +51,8 @@ class SplitButton extends _react.Component {
51
51
  _defineProperty(this, "anchorRef", /*#__PURE__*/_react.default.createRef());
52
52
 
53
53
  _defineProperty(this, "handleKeyDown", event => {
54
- event.preventDefault();
55
-
56
54
  if (event.key === 'Escape' && this.state.open) {
55
+ event.preventDefault();
57
56
  event.stopPropagation();
58
57
  this.setState({
59
58
  open: false
@@ -68,9 +68,8 @@ class DropdownButton extends Component {
68
68
  _defineProperty(this, "anchorRef", /*#__PURE__*/React.createRef());
69
69
 
70
70
  _defineProperty(this, "handleKeyDown", event => {
71
- event.preventDefault();
72
-
73
71
  if (event.key === 'Escape' && this.state.open) {
72
+ event.preventDefault();
74
73
  event.stopPropagation();
75
74
  this.setState({
76
75
  open: false
@@ -29,9 +29,8 @@ class SplitButton extends Component {
29
29
  _defineProperty(this, "anchorRef", /*#__PURE__*/React.createRef());
30
30
 
31
31
  _defineProperty(this, "handleKeyDown", event => {
32
- event.preventDefault();
33
-
34
32
  if (event.key === 'Escape' && this.state.open) {
33
+ event.preventDefault();
35
34
  event.stopPropagation();
36
35
  this.setState({
37
36
  open: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/button",
3
- "version": "9.9.0-alpha.1",
3
+ "version": "9.9.0",
4
4
  "description": "UI Button",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,11 +33,11 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2-ui/layer": "9.9.0-alpha.1",
37
- "@dhis2-ui/loader": "9.9.0-alpha.1",
38
- "@dhis2-ui/popper": "9.9.0-alpha.1",
39
- "@dhis2/ui-constants": "9.9.0-alpha.1",
40
- "@dhis2/ui-icons": "9.9.0-alpha.1",
36
+ "@dhis2-ui/layer": "9.9.0",
37
+ "@dhis2-ui/loader": "9.9.0",
38
+ "@dhis2-ui/popper": "9.9.0",
39
+ "@dhis2/ui-constants": "9.9.0",
40
+ "@dhis2/ui-icons": "9.9.0",
41
41
  "classnames": "^2.3.1",
42
42
  "prop-types": "^15.7.2"
43
43
  },