@dhis2-ui/select 10.7.6 → 10.7.7
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.
- package/build/cjs/select/select.js +7 -1
- package/build/es/select/select.js +7 -1
- package/package.json +15 -15
|
@@ -114,7 +114,6 @@ class Select extends _react.Component {
|
|
|
114
114
|
if (e.defaultPrevented) {
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
|
-
e.stopPropagation();
|
|
118
117
|
const {
|
|
119
118
|
open
|
|
120
119
|
} = this.state;
|
|
@@ -123,6 +122,13 @@ class Select extends _react.Component {
|
|
|
123
122
|
} = e;
|
|
124
123
|
const shouldOpen = !open && (keyCode === SPACE_KEY || keyCode === UP_KEY || keyCode === DOWN_KEY);
|
|
125
124
|
const shouldClose = open && keyCode === ESCAPE_KEY;
|
|
125
|
+
|
|
126
|
+
/* Do not block event propagation when the Select is closed unless
|
|
127
|
+
* the key to open it is pressed, so that other components like
|
|
128
|
+
* the Modal can still respond to keypresses (i.e. ESC to close) */
|
|
129
|
+
if (open || shouldOpen) {
|
|
130
|
+
e.stopPropagation();
|
|
131
|
+
}
|
|
126
132
|
if (shouldClose) {
|
|
127
133
|
return this.handleClose();
|
|
128
134
|
}
|
|
@@ -106,7 +106,6 @@ export class Select extends Component {
|
|
|
106
106
|
if (e.defaultPrevented) {
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
e.stopPropagation();
|
|
110
109
|
const {
|
|
111
110
|
open
|
|
112
111
|
} = this.state;
|
|
@@ -115,6 +114,13 @@ export class Select extends Component {
|
|
|
115
114
|
} = e;
|
|
116
115
|
const shouldOpen = !open && (keyCode === SPACE_KEY || keyCode === UP_KEY || keyCode === DOWN_KEY);
|
|
117
116
|
const shouldClose = open && keyCode === ESCAPE_KEY;
|
|
117
|
+
|
|
118
|
+
/* Do not block event propagation when the Select is closed unless
|
|
119
|
+
* the key to open it is pressed, so that other components like
|
|
120
|
+
* the Modal can still respond to keypresses (i.e. ESC to close) */
|
|
121
|
+
if (open || shouldOpen) {
|
|
122
|
+
e.stopPropagation();
|
|
123
|
+
}
|
|
118
124
|
if (shouldClose) {
|
|
119
125
|
return this.handleClose();
|
|
120
126
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/select",
|
|
3
|
-
"version": "10.7.
|
|
3
|
+
"version": "10.7.7",
|
|
4
4
|
"description": "UI Select",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
"styled-jsx": "^4"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@dhis2-ui/box": "10.7.
|
|
37
|
-
"@dhis2-ui/button": "10.7.
|
|
38
|
-
"@dhis2-ui/card": "10.7.
|
|
39
|
-
"@dhis2-ui/checkbox": "10.7.
|
|
40
|
-
"@dhis2-ui/chip": "10.7.
|
|
41
|
-
"@dhis2-ui/field": "10.7.
|
|
42
|
-
"@dhis2-ui/input": "10.7.
|
|
43
|
-
"@dhis2-ui/layer": "10.7.
|
|
44
|
-
"@dhis2-ui/loader": "10.7.
|
|
45
|
-
"@dhis2-ui/popper": "10.7.
|
|
46
|
-
"@dhis2-ui/status-icon": "10.7.
|
|
47
|
-
"@dhis2-ui/tooltip": "10.7.
|
|
36
|
+
"@dhis2-ui/box": "10.7.7",
|
|
37
|
+
"@dhis2-ui/button": "10.7.7",
|
|
38
|
+
"@dhis2-ui/card": "10.7.7",
|
|
39
|
+
"@dhis2-ui/checkbox": "10.7.7",
|
|
40
|
+
"@dhis2-ui/chip": "10.7.7",
|
|
41
|
+
"@dhis2-ui/field": "10.7.7",
|
|
42
|
+
"@dhis2-ui/input": "10.7.7",
|
|
43
|
+
"@dhis2-ui/layer": "10.7.7",
|
|
44
|
+
"@dhis2-ui/loader": "10.7.7",
|
|
45
|
+
"@dhis2-ui/popper": "10.7.7",
|
|
46
|
+
"@dhis2-ui/status-icon": "10.7.7",
|
|
47
|
+
"@dhis2-ui/tooltip": "10.7.7",
|
|
48
48
|
"@dhis2/prop-types": "^3.1.2",
|
|
49
|
-
"@dhis2/ui-constants": "10.7.
|
|
50
|
-
"@dhis2/ui-icons": "10.7.
|
|
49
|
+
"@dhis2/ui-constants": "10.7.7",
|
|
50
|
+
"@dhis2/ui-icons": "10.7.7",
|
|
51
51
|
"classnames": "^2.3.1",
|
|
52
52
|
"prop-types": "^15.7.2"
|
|
53
53
|
},
|