@patternfly/react-core 4.198.3 → 4.198.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.198.3",
3
+ "version": "4.198.6",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -34,9 +34,9 @@
34
34
  "generate": "node scripts/copyStyles.js"
35
35
  },
36
36
  "dependencies": {
37
- "@patternfly/react-icons": "^4.49.3",
38
- "@patternfly/react-styles": "^4.48.3",
39
- "@patternfly/react-tokens": "^4.50.3",
37
+ "@patternfly/react-icons": "^4.49.6",
38
+ "@patternfly/react-styles": "^4.48.6",
39
+ "@patternfly/react-tokens": "^4.50.6",
40
40
  "focus-trap": "6.2.2",
41
41
  "react-dropzone": "9.0.0",
42
42
  "tippy.js": "5.1.2",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.8.0 || ^17.0.0",
61
61
  "react-dom": "^16.8.0 || ^17.0.0"
62
62
  },
63
- "gitHead": "4e50ab91a4508236b1517ec11199d300e1b77206"
63
+ "gitHead": "f9f1ab0c374403263791ffb2b25941b7c27721d8"
64
64
  }
@@ -261,10 +261,8 @@ export class Select extends React.Component<SelectProps & OUIAProps, SelectState
261
261
  if (firstRef && firstRef[0]) {
262
262
  firstRef[0].focus();
263
263
  }
264
- }
265
-
266
- // if viewMoreNextIndex is not -1, view more was clicked, set focus on first newly loaded item
267
- if (
264
+ } else if (
265
+ // if viewMoreNextIndex is not -1, view more was clicked, set focus on first newly loaded item
268
266
  this.state.viewMoreNextIndex !== -1 &&
269
267
  this.refCollection.length > this.state.viewMoreNextIndex &&
270
268
  this.props.loadingVariant !== 'spinner' &&
@@ -352,7 +350,8 @@ export class Select extends React.Component<SelectProps & OUIAProps, SelectState
352
350
  typeaheadFilteredChildren: React.Children.toArray(this.props.children)
353
351
  }),
354
352
  typeaheadCurrIndex: -1,
355
- tabbedIntoFavoritesMenu: false
353
+ tabbedIntoFavoritesMenu: false,
354
+ viewMoreNextIndex: -1
356
355
  });
357
356
  };
358
357
 
@@ -385,7 +384,8 @@ export class Select extends React.Component<SelectProps & OUIAProps, SelectState
385
384
  noResultsFoundText,
386
385
  children,
387
386
  isGrouped,
388
- isCreateSelectOptionObject
387
+ isCreateSelectOptionObject,
388
+ loadingVariant
389
389
  } = this.props;
390
390
 
391
391
  if (onFilter) {
@@ -439,6 +439,16 @@ export class Select extends React.Component<SelectProps & OUIAProps, SelectState
439
439
  (valueToCheck as SelectOptionObject).toString &&
440
440
  (valueToCheck as SelectOptionObject).compareTo;
441
441
 
442
+ // View more option should be returned as not a match
443
+ if (loadingVariant !== 'spinner' && loadingVariant?.text === valueToCheck) {
444
+ return true;
445
+ }
446
+
447
+ // spinner should be returned as not a match
448
+ if (loadingVariant === 'spinner' && valueToCheck === 'loading') {
449
+ return true;
450
+ }
451
+
442
452
  if (isSelectOptionObject) {
443
453
  return (valueToCheck as SelectOptionObject).compareTo(typeaheadInputValue);
444
454
  } else {
@@ -297,6 +297,9 @@ export class SelectOption extends React.Component<SelectOptionProps> {
297
297
  event.stopPropagation();
298
298
  }}
299
299
  ref={this.ref}
300
+ onKeyDown={(event: React.KeyboardEvent) => {
301
+ this.onKeyDown(event, 0);
302
+ }}
300
303
  type="button"
301
304
  >
302
305
  {itemDisplay}
@@ -162,7 +162,7 @@ export class SelectToggle extends React.Component<SelectToggleProps> {
162
162
  }
163
163
  // Current element is in footer.
164
164
  if (event.shiftKey) {
165
- // Move focus back to menuif current tab index is 0
165
+ // Move focus back to menu if current tab index is 0
166
166
  if (currentElementIndex === 0) {
167
167
  moveFocusToLastMenuItem();
168
168
  event.preventDefault();