@patternfly/react-core 5.0.0-alpha.21 → 5.0.0-alpha.22
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 +6 -0
- package/components/DataList/DataListCheck.d.ts +1 -1
- package/components/DataList/DataListCheck.d.ts.map +1 -1
- package/components/DataList/DataListCheck.js +2 -2
- package/components/DataList/DataListCheck.js.map +1 -1
- package/dist/esm/components/DataList/DataListCheck.d.ts +1 -1
- package/dist/esm/components/DataList/DataListCheck.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataListCheck.js +2 -2
- package/dist/esm/components/DataList/DataListCheck.js.map +1 -1
- package/dist/js/components/DataList/DataListCheck.d.ts +1 -1
- package/dist/js/components/DataList/DataListCheck.d.ts.map +1 -1
- package/dist/js/components/DataList/DataListCheck.js +2 -2
- package/dist/js/components/DataList/DataListCheck.js.map +1 -1
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +2 -2
- package/src/components/DataList/DataListCheck.tsx +3 -3
- package/src/components/DataList/__tests__/Generated/DataListCheck.test.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.22",
|
|
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",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": "^16.8 || ^17 || ^18",
|
|
71
71
|
"react-dom": "^16.8 || ^17 || ^18"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "4ce5d3887ed6061107702090244b680ca006f3f1"
|
|
74
74
|
}
|
|
@@ -24,7 +24,7 @@ export interface DataListCheckProps extends Omit<React.HTMLProps<HTMLInputElemen
|
|
|
24
24
|
*/
|
|
25
25
|
defaultChecked?: boolean;
|
|
26
26
|
/** A callback for when the DataList checkbox selection changes */
|
|
27
|
-
onChange?: (
|
|
27
|
+
onChange?: (event: React.FormEvent<HTMLInputElement>, checked: boolean) => void;
|
|
28
28
|
/** Aria-labelledby of the DataList checkbox */
|
|
29
29
|
'aria-labelledby': string;
|
|
30
30
|
/** Flag to indicate if other controls are used in the DataListItem */
|
|
@@ -34,7 +34,7 @@ export interface DataListCheckProps extends Omit<React.HTMLProps<HTMLInputElemen
|
|
|
34
34
|
export const DataListCheck: React.FunctionComponent<DataListCheckProps> = ({
|
|
35
35
|
className = '',
|
|
36
36
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
|
-
onChange = (
|
|
37
|
+
onChange = (event: React.FormEvent<HTMLInputElement>, checked: boolean) => {},
|
|
38
38
|
isValid = true,
|
|
39
39
|
isDisabled = false,
|
|
40
40
|
isChecked = false,
|
|
@@ -48,7 +48,7 @@ export const DataListCheck: React.FunctionComponent<DataListCheckProps> = ({
|
|
|
48
48
|
<input
|
|
49
49
|
{...props}
|
|
50
50
|
type="checkbox"
|
|
51
|
-
onChange={event => onChange(event.currentTarget.checked
|
|
51
|
+
onChange={(event) => onChange(event, event.currentTarget.checked)}
|
|
52
52
|
aria-invalid={!isValid}
|
|
53
53
|
disabled={isDisabled}
|
|
54
54
|
{...([true, false].includes(defaultChecked) && { defaultChecked })}
|
|
@@ -15,7 +15,7 @@ it('DataListCheck should match snapshot (auto-generated)', () => {
|
|
|
15
15
|
isDisabled={false}
|
|
16
16
|
isChecked={null}
|
|
17
17
|
checked={null}
|
|
18
|
-
onChange={(
|
|
18
|
+
onChange={(event: React.FormEvent<HTMLInputElement>, checked: boolean) => {}}
|
|
19
19
|
aria-labelledby={'string'}
|
|
20
20
|
/>
|
|
21
21
|
);
|