@atlaskit/react-select 2.7.4 → 2.7.5

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/react-select
2
2
 
3
+ ## 2.7.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#173706](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173706)
8
+ [`a37d69dbb048b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a37d69dbb048b) -
9
+ Remove onMenuClose call when input is blur
10
+
3
11
  ## 2.7.4
4
12
 
5
13
  ### Patch Changes
@@ -636,7 +636,12 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
636
636
  action: 'input-blur',
637
637
  prevInputValue: prevInputValue
638
638
  });
639
- _this.onMenuClose();
639
+ if ((0, _platformFeatureFlags.fg)('platform_dst_select_menu_close_on_blur')) {
640
+ // when fg is enabled, we only call onMenuClose when this.props.menuIsOpen is true.
641
+ _this.props.menuIsOpen && _this.onMenuClose();
642
+ } else {
643
+ _this.onMenuClose();
644
+ }
640
645
  _this.setState({
641
646
  focusedValue: null,
642
647
  isFocused: false
@@ -609,7 +609,12 @@ export default class Select extends Component {
609
609
  action: 'input-blur',
610
610
  prevInputValue
611
611
  });
612
- this.onMenuClose();
612
+ if (fg('platform_dst_select_menu_close_on_blur')) {
613
+ // when fg is enabled, we only call onMenuClose when this.props.menuIsOpen is true.
614
+ this.props.menuIsOpen && this.onMenuClose();
615
+ } else {
616
+ this.onMenuClose();
617
+ }
613
618
  this.setState({
614
619
  focusedValue: null,
615
620
  isFocused: false
@@ -627,7 +627,12 @@ var Select = /*#__PURE__*/function (_Component) {
627
627
  action: 'input-blur',
628
628
  prevInputValue: prevInputValue
629
629
  });
630
- _this.onMenuClose();
630
+ if (fg('platform_dst_select_menu_close_on_blur')) {
631
+ // when fg is enabled, we only call onMenuClose when this.props.menuIsOpen is true.
632
+ _this.props.menuIsOpen && _this.onMenuClose();
633
+ } else {
634
+ _this.onMenuClose();
635
+ }
631
636
  _this.setState({
632
637
  focusedValue: null,
633
638
  isFocused: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "2.7.4",
3
+ "version": "2.7.5",
4
4
  "description": "A forked version of react-select to only be used in atlaskit/select",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,9 +33,9 @@
33
33
  "@atlaskit/icon": "^27.0.0",
34
34
  "@atlaskit/layering": "^3.0.0",
35
35
  "@atlaskit/platform-feature-flags": "^1.1.0",
36
- "@atlaskit/primitives": "^14.8.0",
36
+ "@atlaskit/primitives": "^14.9.0",
37
37
  "@atlaskit/spinner": "^18.0.0",
38
- "@atlaskit/tokens": "^5.2.0",
38
+ "@atlaskit/tokens": "^5.4.0",
39
39
  "@babel/runtime": "^7.0.0",
40
40
  "@compiled/react": "^0.18.3",
41
41
  "@emotion/react": "^11.7.1",
@@ -68,6 +68,9 @@
68
68
  },
69
69
  "compiled-react-select": {
70
70
  "type": "boolean"
71
+ },
72
+ "platform_dst_select_menu_close_on_blur": {
73
+ "type": "boolean"
71
74
  }
72
75
  },
73
76
  "techstack": {