@atlaskit/react-select 3.4.3 → 3.4.4
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/CHANGELOG.md +7 -0
- package/async/package.json +1 -1
- package/async-creatable/package.json +1 -1
- package/base/package.json +1 -1
- package/creatable/package.json +1 -1
- package/dist/cjs/select.js +6 -17
- package/dist/es2019/select.js +6 -17
- package/dist/esm/select.js +6 -17
- package/dist/types/select.d.ts +0 -7
- package/dist/types-ts4.5/select.d.ts +0 -7
- package/package.json +1 -1
- package/types/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/react-select
|
|
2
2
|
|
|
3
|
+
## 3.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4129d4df5bb4d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4129d4df5bb4d) -
|
|
8
|
+
Revert the changes done to add prop hasOtherFocusableElements flag
|
|
9
|
+
|
|
3
10
|
## 3.4.3
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/async/package.json
CHANGED
package/base/package.json
CHANGED
package/creatable/package.json
CHANGED
package/dist/cjs/select.js
CHANGED
|
@@ -52,7 +52,6 @@ var defaultProps = exports.defaultProps = {
|
|
|
52
52
|
isMulti: false,
|
|
53
53
|
isRtl: false,
|
|
54
54
|
isSearchable: true,
|
|
55
|
-
hasOtherFocusableElements: false,
|
|
56
55
|
isOptionDisabled: _builtins.isOptionDisabled,
|
|
57
56
|
loadingMessage: function loadingMessage() {
|
|
58
57
|
return 'Loading...';
|
|
@@ -258,7 +257,6 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
258
257
|
(0, _defineProperty2.default)(_this, "initialTouchY", 0);
|
|
259
258
|
(0, _defineProperty2.default)(_this, "openAfterFocus", false);
|
|
260
259
|
(0, _defineProperty2.default)(_this, "scrollToFocusedOptionOnUpdate", false);
|
|
261
|
-
(0, _defineProperty2.default)(_this, "lastPressedKey", '');
|
|
262
260
|
// Refs
|
|
263
261
|
// ------------------------------
|
|
264
262
|
(0, _defineProperty2.default)(_this, "controlRef", null);
|
|
@@ -640,9 +638,7 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
640
638
|
return;
|
|
641
639
|
}
|
|
642
640
|
if (_this.props.onBlur) {
|
|
643
|
-
|
|
644
|
-
_this.props.onBlur(event);
|
|
645
|
-
}
|
|
641
|
+
_this.props.onBlur(event);
|
|
646
642
|
}
|
|
647
643
|
_this.onInputChange('', {
|
|
648
644
|
action: 'input-blur',
|
|
@@ -708,9 +704,6 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
708
704
|
return;
|
|
709
705
|
}
|
|
710
706
|
}
|
|
711
|
-
if (_this.props.hasOtherFocusableElements) {
|
|
712
|
-
_this.lastPressedKey = event.key;
|
|
713
|
-
}
|
|
714
707
|
|
|
715
708
|
// Block option hover events when the user has just pressed a key
|
|
716
709
|
_this.blockOptionHover = true;
|
|
@@ -936,15 +929,11 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
936
929
|
}, {
|
|
937
930
|
key: "onMenuClose",
|
|
938
931
|
value: function onMenuClose() {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
this.props.onMenuClose();
|
|
945
|
-
} else {
|
|
946
|
-
this.lastPressedKey = '';
|
|
947
|
-
}
|
|
932
|
+
this.onInputChange('', {
|
|
933
|
+
action: 'menu-close',
|
|
934
|
+
prevInputValue: this.props.inputValue
|
|
935
|
+
});
|
|
936
|
+
this.props.onMenuClose();
|
|
948
937
|
}
|
|
949
938
|
}, {
|
|
950
939
|
key: "onInputChange",
|
package/dist/es2019/select.js
CHANGED
|
@@ -31,7 +31,6 @@ export const defaultProps = {
|
|
|
31
31
|
isMulti: false,
|
|
32
32
|
isRtl: false,
|
|
33
33
|
isSearchable: true,
|
|
34
|
-
hasOtherFocusableElements: false,
|
|
35
34
|
isOptionDisabled: isOptionDisabledBuiltin,
|
|
36
35
|
loadingMessage: () => 'Loading...',
|
|
37
36
|
maxMenuHeight: 300,
|
|
@@ -227,7 +226,6 @@ export default class Select extends Component {
|
|
|
227
226
|
_defineProperty(this, "initialTouchY", 0);
|
|
228
227
|
_defineProperty(this, "openAfterFocus", false);
|
|
229
228
|
_defineProperty(this, "scrollToFocusedOptionOnUpdate", false);
|
|
230
|
-
_defineProperty(this, "lastPressedKey", '');
|
|
231
229
|
// Refs
|
|
232
230
|
// ------------------------------
|
|
233
231
|
_defineProperty(this, "controlRef", null);
|
|
@@ -613,9 +611,7 @@ export default class Select extends Component {
|
|
|
613
611
|
return;
|
|
614
612
|
}
|
|
615
613
|
if (this.props.onBlur) {
|
|
616
|
-
|
|
617
|
-
this.props.onBlur(event);
|
|
618
|
-
}
|
|
614
|
+
this.props.onBlur(event);
|
|
619
615
|
}
|
|
620
616
|
this.onInputChange('', {
|
|
621
617
|
action: 'input-blur',
|
|
@@ -683,9 +679,6 @@ export default class Select extends Component {
|
|
|
683
679
|
return;
|
|
684
680
|
}
|
|
685
681
|
}
|
|
686
|
-
if (this.props.hasOtherFocusableElements) {
|
|
687
|
-
this.lastPressedKey = event.key;
|
|
688
|
-
}
|
|
689
682
|
|
|
690
683
|
// Block option hover events when the user has just pressed a key
|
|
691
684
|
this.blockOptionHover = true;
|
|
@@ -968,15 +961,11 @@ export default class Select extends Component {
|
|
|
968
961
|
this.props.onMenuOpen();
|
|
969
962
|
}
|
|
970
963
|
onMenuClose() {
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
this.props.onMenuClose();
|
|
977
|
-
} else {
|
|
978
|
-
this.lastPressedKey = '';
|
|
979
|
-
}
|
|
964
|
+
this.onInputChange('', {
|
|
965
|
+
action: 'menu-close',
|
|
966
|
+
prevInputValue: this.props.inputValue
|
|
967
|
+
});
|
|
968
|
+
this.props.onMenuClose();
|
|
980
969
|
}
|
|
981
970
|
onInputChange(newValue, actionMeta) {
|
|
982
971
|
this.props.onInputChange(newValue, actionMeta);
|
package/dist/esm/select.js
CHANGED
|
@@ -43,7 +43,6 @@ export var defaultProps = {
|
|
|
43
43
|
isMulti: false,
|
|
44
44
|
isRtl: false,
|
|
45
45
|
isSearchable: true,
|
|
46
|
-
hasOtherFocusableElements: false,
|
|
47
46
|
isOptionDisabled: isOptionDisabledBuiltin,
|
|
48
47
|
loadingMessage: function loadingMessage() {
|
|
49
48
|
return 'Loading...';
|
|
@@ -249,7 +248,6 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
249
248
|
_defineProperty(_this, "initialTouchY", 0);
|
|
250
249
|
_defineProperty(_this, "openAfterFocus", false);
|
|
251
250
|
_defineProperty(_this, "scrollToFocusedOptionOnUpdate", false);
|
|
252
|
-
_defineProperty(_this, "lastPressedKey", '');
|
|
253
251
|
// Refs
|
|
254
252
|
// ------------------------------
|
|
255
253
|
_defineProperty(_this, "controlRef", null);
|
|
@@ -631,9 +629,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
631
629
|
return;
|
|
632
630
|
}
|
|
633
631
|
if (_this.props.onBlur) {
|
|
634
|
-
|
|
635
|
-
_this.props.onBlur(event);
|
|
636
|
-
}
|
|
632
|
+
_this.props.onBlur(event);
|
|
637
633
|
}
|
|
638
634
|
_this.onInputChange('', {
|
|
639
635
|
action: 'input-blur',
|
|
@@ -699,9 +695,6 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
699
695
|
return;
|
|
700
696
|
}
|
|
701
697
|
}
|
|
702
|
-
if (_this.props.hasOtherFocusableElements) {
|
|
703
|
-
_this.lastPressedKey = event.key;
|
|
704
|
-
}
|
|
705
698
|
|
|
706
699
|
// Block option hover events when the user has just pressed a key
|
|
707
700
|
_this.blockOptionHover = true;
|
|
@@ -927,15 +920,11 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
927
920
|
}, {
|
|
928
921
|
key: "onMenuClose",
|
|
929
922
|
value: function onMenuClose() {
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
this.props.onMenuClose();
|
|
936
|
-
} else {
|
|
937
|
-
this.lastPressedKey = '';
|
|
938
|
-
}
|
|
923
|
+
this.onInputChange('', {
|
|
924
|
+
action: 'menu-close',
|
|
925
|
+
prevInputValue: this.props.inputValue
|
|
926
|
+
});
|
|
927
|
+
this.props.onMenuClose();
|
|
939
928
|
}
|
|
940
929
|
}, {
|
|
941
930
|
key: "onInputChange",
|
package/dist/types/select.d.ts
CHANGED
|
@@ -240,10 +240,6 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
|
|
|
240
240
|
* Whether to enable search functionality
|
|
241
241
|
*/
|
|
242
242
|
isSearchable: boolean;
|
|
243
|
-
/**
|
|
244
|
-
* Indicate whether menu contains other focusable elements, like footer or header
|
|
245
|
-
*/
|
|
246
|
-
hasOtherFocusableElements?: boolean;
|
|
247
243
|
/**
|
|
248
244
|
* This sets the aria-label attribute. It sets an accessible name for the select, for people who use assistive technology. Use of a visible label is highly recommended for greater accessibility support.
|
|
249
245
|
*/
|
|
@@ -453,7 +449,6 @@ export declare const defaultProps: {
|
|
|
453
449
|
isMulti: boolean;
|
|
454
450
|
isRtl: boolean;
|
|
455
451
|
isSearchable: boolean;
|
|
456
|
-
hasOtherFocusableElements: boolean;
|
|
457
452
|
isOptionDisabled: <Option>(option: Option) => boolean;
|
|
458
453
|
loadingMessage: () => string;
|
|
459
454
|
maxMenuHeight: number;
|
|
@@ -533,7 +528,6 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
533
528
|
isMulti: boolean;
|
|
534
529
|
isRtl: boolean;
|
|
535
530
|
isSearchable: boolean;
|
|
536
|
-
hasOtherFocusableElements: boolean;
|
|
537
531
|
isOptionDisabled: <Option_1>(option: Option_1) => boolean;
|
|
538
532
|
loadingMessage: () => string;
|
|
539
533
|
maxMenuHeight: number;
|
|
@@ -566,7 +560,6 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
566
560
|
openAfterFocus: boolean;
|
|
567
561
|
scrollToFocusedOptionOnUpdate: boolean;
|
|
568
562
|
userIsDragging?: boolean;
|
|
569
|
-
lastPressedKey?: string;
|
|
570
563
|
controlRef: HTMLDivElement | null;
|
|
571
564
|
getControlRef: RefCallback<HTMLDivElement>;
|
|
572
565
|
focusedOptionRef: HTMLDivElement | null;
|
|
@@ -240,10 +240,6 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
|
|
|
240
240
|
* Whether to enable search functionality
|
|
241
241
|
*/
|
|
242
242
|
isSearchable: boolean;
|
|
243
|
-
/**
|
|
244
|
-
* Indicate whether menu contains other focusable elements, like footer or header
|
|
245
|
-
*/
|
|
246
|
-
hasOtherFocusableElements?: boolean;
|
|
247
243
|
/**
|
|
248
244
|
* This sets the aria-label attribute. It sets an accessible name for the select, for people who use assistive technology. Use of a visible label is highly recommended for greater accessibility support.
|
|
249
245
|
*/
|
|
@@ -453,7 +449,6 @@ export declare const defaultProps: {
|
|
|
453
449
|
isMulti: boolean;
|
|
454
450
|
isRtl: boolean;
|
|
455
451
|
isSearchable: boolean;
|
|
456
|
-
hasOtherFocusableElements: boolean;
|
|
457
452
|
isOptionDisabled: <Option>(option: Option) => boolean;
|
|
458
453
|
loadingMessage: () => string;
|
|
459
454
|
maxMenuHeight: number;
|
|
@@ -533,7 +528,6 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
533
528
|
isMulti: boolean;
|
|
534
529
|
isRtl: boolean;
|
|
535
530
|
isSearchable: boolean;
|
|
536
|
-
hasOtherFocusableElements: boolean;
|
|
537
531
|
isOptionDisabled: <Option_1>(option: Option_1) => boolean;
|
|
538
532
|
loadingMessage: () => string;
|
|
539
533
|
maxMenuHeight: number;
|
|
@@ -566,7 +560,6 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
566
560
|
openAfterFocus: boolean;
|
|
567
561
|
scrollToFocusedOptionOnUpdate: boolean;
|
|
568
562
|
userIsDragging?: boolean;
|
|
569
|
-
lastPressedKey?: string;
|
|
570
563
|
controlRef: HTMLDivElement | null;
|
|
571
564
|
getControlRef: RefCallback<HTMLDivElement>;
|
|
572
565
|
focusedOptionRef: HTMLDivElement | null;
|
package/package.json
CHANGED