Skip to content

Commit 077498b

Browse files
committed
fix(pf3): fix props in radio
1 parent 5378404 commit 077498b

1 file changed

Lines changed: 2 additions & 23 deletions

File tree

  • packages/pf3-component-mapper/src/files

packages/pf3-component-mapper/src/files/radio.js

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,7 @@ import { Radio as Pf3Radio } from 'patternfly-react';
88
const RadioOption = ({ name, option, isDisabled, isReadOnly }) => {
99
const { input } = useFieldApi({ name, type: 'radio', value: option.value });
1010
return (
11-
<Pf3Radio
12-
key={`${name}-${option.value}`}
13-
{...input}
14-
onChange={() => {
15-
input.onChange(option.value);
16-
}}
17-
disabled={isDisabled || isReadOnly}
18-
>
11+
<Pf3Radio key={`${name}-${option.value}`} {...input} onChange={() => input.onChange(option.value)} disabled={isDisabled || isReadOnly}>
1912
{option.label}
2013
</Pf3Radio>
2114
);
@@ -28,20 +21,7 @@ RadioOption.propTypes = {
2821
isReadOnly: PropTypes.bool
2922
};
3023

31-
const Radio = ({
32-
name,
33-
isRequired,
34-
isDisabled,
35-
isReadOnly,
36-
validateOnMount,
37-
helperText,
38-
label,
39-
description,
40-
hideLabel,
41-
options,
42-
inputAddon,
43-
...props
44-
}) => {
24+
const Radio = ({ name, isRequired, isDisabled, isReadOnly, validateOnMount, helperText, label, description, hideLabel, options, inputAddon }) => {
4525
const { meta } = useFieldApi({ name, type: 'radio' });
4626
return (
4727
<FormGroup
@@ -70,7 +50,6 @@ Radio.propTypes = {
7050
isRequired: PropTypes.bool,
7151
helperText: PropTypes.string,
7252
description: PropTypes.string,
73-
placeholder: PropTypes.string,
7453
isDisabled: PropTypes.bool,
7554
options: PropTypes.arrayOf(PropTypes.shape({ label: PropTypes.string, value: PropTypes.any })),
7655
inputAddon: PropTypes.shape({ fields: PropTypes.array })

0 commit comments

Comments
 (0)