@patternfly/react-core 4.225.10 → 4.225.11

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.225.10",
3
+ "version": "4.225.11",
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.76.10",
38
- "@patternfly/react-styles": "^4.75.10",
39
- "@patternfly/react-tokens": "^4.77.10",
37
+ "@patternfly/react-icons": "^4.76.11",
38
+ "@patternfly/react-styles": "^4.75.11",
39
+ "@patternfly/react-tokens": "^4.77.11",
40
40
  "focus-trap": "6.9.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": "ae1f341cfd4e094892f9fba068aece48bef36dd3"
63
+ "gitHead": "aaeb37eb17dd5180aaa6ac3548fd4ac52c2a6eb7"
64
64
  }
@@ -297,41 +297,39 @@ export class Select extends React.Component<SelectProps & OUIAProps, SelectState
297
297
  this.setState({ viewMoreNextIndex: -1 });
298
298
  }
299
299
 
300
- if (this.props.variant === 'typeahead' || this.props.variant === 'typeaheadmulti') {
301
- const checkUpdatedChildren = (prevChildren: React.ReactElement[], currChildren: React.ReactElement[]) =>
302
- Array.from(prevChildren).some((prevChild: React.ReactElement, index: number) => {
303
- const prevChildProps = prevChild.props;
304
- const currChild = currChildren[index];
305
- const { props: currChildProps } = currChild;
306
-
307
- if (prevChildProps && currChildProps) {
308
- return (
309
- prevChildProps.value !== currChildProps.value ||
310
- prevChildProps.label !== currChildProps.label ||
311
- prevChildProps.isDisabled !== currChildProps.isDisabled ||
312
- prevChildProps.isPlaceholder !== currChildProps.isPlaceholder
313
- );
314
- } else {
315
- return prevChild !== currChild;
316
- }
317
- });
318
-
319
- const hasUpdatedChildren =
320
- prevProps.children.length !== this.props.children.length ||
321
- checkUpdatedChildren(prevProps.children, this.props.children) ||
322
- (this.props.isGrouped &&
323
- Array.from(prevProps.children).some(
324
- (prevChild: React.ReactElement, index: number) =>
325
- prevChild.type === SelectGroup &&
326
- prevChild.props.children &&
327
- this.props.children[index].props.children &&
328
- (prevChild.props.children.length !== this.props.children[index].props.children.length ||
329
- checkUpdatedChildren(prevChild.props.children, this.props.children[index].props.children))
330
- ));
331
-
332
- if (hasUpdatedChildren) {
333
- this.updateTypeAheadFilteredChildren(prevState.typeaheadInputValue || '', null);
334
- }
300
+ const checkUpdatedChildren = (prevChildren: React.ReactElement[], currChildren: React.ReactElement[]) =>
301
+ Array.from(prevChildren).some((prevChild: React.ReactElement, index: number) => {
302
+ const prevChildProps = prevChild.props;
303
+ const currChild = currChildren[index];
304
+ const { props: currChildProps } = currChild;
305
+
306
+ if (prevChildProps && currChildProps) {
307
+ return (
308
+ prevChildProps.value !== currChildProps.value ||
309
+ prevChildProps.label !== currChildProps.label ||
310
+ prevChildProps.isDisabled !== currChildProps.isDisabled ||
311
+ prevChildProps.isPlaceholder !== currChildProps.isPlaceholder
312
+ );
313
+ } else {
314
+ return prevChild !== currChild;
315
+ }
316
+ });
317
+
318
+ const hasUpdatedChildren =
319
+ prevProps.children.length !== this.props.children.length ||
320
+ checkUpdatedChildren(prevProps.children, this.props.children) ||
321
+ (this.props.isGrouped &&
322
+ Array.from(prevProps.children).some(
323
+ (prevChild: React.ReactElement, index: number) =>
324
+ prevChild.type === SelectGroup &&
325
+ prevChild.props.children &&
326
+ this.props.children[index].props.children &&
327
+ (prevChild.props.children.length !== this.props.children[index].props.children.length ||
328
+ checkUpdatedChildren(prevChild.props.children, this.props.children[index].props.children))
329
+ ));
330
+
331
+ if (hasUpdatedChildren) {
332
+ this.updateTypeAheadFilteredChildren(prevState.typeaheadInputValue || '', null);
335
333
  }
336
334
 
337
335
  // for menus with favorites,