@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/CHANGELOG.md +11 -0
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +23 -25
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +23 -25
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/umd/react-core.css +35 -35
- package/dist/umd/react-core.js +23 -25
- package/dist/umd/react-core.min.css +34 -34
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +5 -5
- package/src/components/Select/Select.tsx +33 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.225.
|
|
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.
|
|
38
|
-
"@patternfly/react-styles": "^4.75.
|
|
39
|
-
"@patternfly/react-tokens": "^4.77.
|
|
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": "
|
|
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
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
(
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
(prevChild.props.children
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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,
|