@patternfly/react-table 4.85.0 → 4.85.1

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 4.85.1 (2022-05-23)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **Select:** allow enter to create when there is a single option ([#7444](https://github.com/patternfly/patternfly-react/issues/7444)) ([e1ae6a9](https://github.com/patternfly/patternfly-react/commit/e1ae6a9aa7dee0f8107905ec1d47463fce950ff3))
12
+
13
+
14
+
15
+
16
+
6
17
  # 4.85.0 (2022-05-19)
7
18
 
8
19
 
@@ -5905,12 +5905,12 @@
5905
5905
  }
5906
5906
  };
5907
5907
  this.handleTypeaheadKeys = (position, shiftKey = false) => {
5908
- const { isOpen, onFavorite } = this.props;
5908
+ const { isOpen, onFavorite, isCreatable } = this.props;
5909
5909
  const { typeaheadCurrIndex, tabbedIntoFavoritesMenu } = this.state;
5910
5910
  const typeaheadActiveChild = this.getTypeaheadActiveChild(typeaheadCurrIndex);
5911
5911
  if (isOpen) {
5912
5912
  if (position === 'enter') {
5913
- if (typeaheadCurrIndex !== -1 && // do not allow selection without moving to an initial option
5913
+ if ((typeaheadCurrIndex !== -1 || (isCreatable && this.refCollection.length === 1)) && // do not allow selection without moving to an initial option unless it is a single create option
5914
5914
  (typeaheadActiveChild || (this.refCollection[0] && this.refCollection[0][0]))) {
5915
5915
  if (typeaheadActiveChild) {
5916
5916
  if (!typeaheadActiveChild.classList.contains('pf-m-load')) {