Skip to content

Commit 6b9615f

Browse files
committed
fix(pf4): pass rest props to option in mutliple checkbox
1 parent d7e4ccf commit 6b9615f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/pf4-component-mapper/src/checkbox/multiple-choice-list.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ import { Checkbox } from '@patternfly/react-core';
66
import MultipleChoiceListCommon, { wrapperProps } from '@data-driven-forms/common/multiple-choice-list';
77
import FormGroup from '../form-group/form-group';
88

9-
const FinalCheckbox = (props) => <Checkbox isChecked={props.checked} {...props} onChange={(_value, e) => props.onChange(e)} />;
9+
const FinalCheckbox = ({ option, ...props }) => (
10+
<Checkbox isChecked={props.checked} {...props} onChange={(_value, e) => props.onChange(e)} {...option} />
11+
);
1012

1113
FinalCheckbox.propTypes = {
1214
checked: PropTypes.bool,
13-
onChange: PropTypes.func.isRequired
15+
onChange: PropTypes.func.isRequired,
16+
option: PropTypes.object
1417
};
1518

1619
const Wrapper = ({ meta, children, ...rest }) => (

0 commit comments

Comments
 (0)