@patternfly/react-core 4.222.0 → 4.222.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.222.0",
3
+ "version": "4.222.1",
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.73.0",
38
- "@patternfly/react-styles": "^4.72.0",
39
- "@patternfly/react-tokens": "^4.74.0",
37
+ "@patternfly/react-icons": "^4.73.1",
38
+ "@patternfly/react-styles": "^4.72.1",
39
+ "@patternfly/react-tokens": "^4.74.1",
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": "9c5a0c99d957bafa3548e1fd4db410a74f7f7ad8"
63
+ "gitHead": "badaa87b0f9005b2daf2a64636260131cc053159"
64
64
  }
@@ -297,11 +297,10 @@ export class Select extends React.Component<SelectProps & OUIAProps, SelectState
297
297
  this.setState({ viewMoreNextIndex: -1 });
298
298
  }
299
299
 
300
- const hasUpdatedChildren =
301
- prevProps.children.length !== this.props.children.length ||
302
- prevProps.children.some((prevChild: React.ReactElement, index: number) => {
300
+ const checkUpdatedChildren = (prevChildren: React.ReactElement[], currChildren: React.ReactElement[]) =>
301
+ prevChildren.some((prevChild: React.ReactElement, index: number) => {
303
302
  const prevChildProps = prevChild.props;
304
- const currChild = this.props.children[index];
303
+ const currChild = currChildren[index];
305
304
  const { props: currChildProps } = currChild;
306
305
 
307
306
  if (prevChildProps && currChildProps) {
@@ -316,6 +315,19 @@ export class Select extends React.Component<SelectProps & OUIAProps, SelectState
316
315
  }
317
316
  });
318
317
 
318
+ const hasUpdatedChildren =
319
+ prevProps.children.length !== this.props.children.length ||
320
+ checkUpdatedChildren(prevProps.children, this.props.children) ||
321
+ (this.props.isGrouped &&
322
+ 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
+
319
331
  if (hasUpdatedChildren) {
320
332
  this.updateTypeAheadFilteredChildren(prevState.typeaheadInputValue || '', null);
321
333
  }