itsa-react-select 16.0.10 → 16.0.12
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/lib/component.jsx +14 -11
- package/package.json +2 -2
package/lib/component.jsx
CHANGED
|
@@ -138,16 +138,17 @@ class Select extends React.Component {
|
|
|
138
138
|
instance.setState({
|
|
139
139
|
expanded: newExpanded,
|
|
140
140
|
btnPressed: true
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
141
|
+
}, () => {
|
|
142
|
+
instance._removeTimer && instance._removeTimer.cancel();
|
|
143
|
+
instance._focusContainer.focusActiveElement();
|
|
144
|
+
// need to go async --> handleClick goes so quick, that is is before handleMouseDown
|
|
145
|
+
async(() => {
|
|
146
|
+
if (!instance._mouseDown && !simulatedClick) {
|
|
147
|
+
instance._removeTimer = later(() => {
|
|
148
|
+
instance.setState({btnPressed: false});
|
|
149
|
+
}, DEF_BUTTON_PRESS_TIME);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
154
|
}
|
|
@@ -226,7 +227,8 @@ class Select extends React.Component {
|
|
|
226
227
|
keyCode = e.keyCode;
|
|
227
228
|
|
|
228
229
|
if (!props.disabled && !props.readOnly && !instance._buttonDown) {
|
|
229
|
-
if ((keyCode===27) && (state.expanded)) {
|
|
230
|
+
// if ((keyCode===27) && (state.expanded)) {
|
|
231
|
+
if (((keyCode===27) || (keyCode===8) || (keyCode===9)) && (state.expanded)) {
|
|
230
232
|
instance.setState({
|
|
231
233
|
expanded: false
|
|
232
234
|
});
|
|
@@ -390,6 +392,7 @@ class Select extends React.Component {
|
|
|
390
392
|
<div className={containerClass} onKeyDown={itemScroll}>
|
|
391
393
|
<FocusContainer
|
|
392
394
|
className={containerSubClass}
|
|
395
|
+
enterKey={13}
|
|
393
396
|
keyDown={40}
|
|
394
397
|
keyUp={38}
|
|
395
398
|
loop={props.loop}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itsa-react-select",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.12",
|
|
4
4
|
"description": "Nice select for react",
|
|
5
5
|
"author": [
|
|
6
6
|
{
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"itsa-dom": "^1.2.2",
|
|
37
37
|
"itsa-react-button": "^16.0.10",
|
|
38
38
|
"itsa-react-clone-props": "^1.1.1",
|
|
39
|
-
"itsa-react-focuscontainer": "^16.0.
|
|
39
|
+
"itsa-react-focuscontainer": "^16.0.9",
|
|
40
40
|
"itsa-utils": "^1.4.1",
|
|
41
41
|
"prop-types": "^15.5.10"
|
|
42
42
|
},
|