Skip to content

Commit 012ec92

Browse files
committed
fix(carbon): do not send component in radio to not set type
1 parent 011a083 commit 012ec92

File tree

1 file changed

+3
-4
lines changed
  • packages/carbon-component-mapper/src/radio

1 file changed

+3
-4
lines changed

packages/carbon-component-mapper/src/radio/radio.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import { FormGroup, RadioButtonGroup, RadioButton } from 'carbon-components-reac
77
import prepareProps from '../prepare-props';
88
import HelperTextBlock from '../helper-text-block/helper-text-block';
99

10-
const Radio = (props) => {
11-
const { labelText, disabled, input, options, FormGroupProps, helperText, meta, validateOnMount, ...rest } = useFieldApi(
12-
prepareProps({ type: 'radio', ...props })
13-
);
10+
const Radio = ({ component, ...props }) => {
11+
const { labelText, disabled, input, options, FormGroupProps, helperText, meta, validateOnMount, ...rest } = useFieldApi(prepareProps(props));
1412

1513
const invalid = (meta.touched || validateOnMount) && (meta.error || meta.submitError);
1614
const warnText = (meta.touched || validateOnMount) && meta.warning;
@@ -28,6 +26,7 @@ const Radio = (props) => {
2826
};
2927

3028
Radio.propTypes = {
29+
component: PropTypes.string,
3130
FormGroupProps: PropTypes.object,
3231
isDisabled: PropTypes.bool,
3332
label: PropTypes.node,

0 commit comments

Comments
 (0)