Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Form.js] Add support for vertical Radio button groups #8414

Merged
merged 2 commits into from
Mar 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion jsx/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2549,7 +2549,7 @@ class RadioElement extends React.Component {

const styleRow = {
display: 'flex',
flexDirection: 'row',
flexDirection: this.props.vertical == false ? 'row' : 'column',
driusan marked this conversation as resolved.
Show resolved Hide resolved
flexWrap: 'wrap',
width: '100%',
};
Expand Down Expand Up @@ -2657,6 +2657,7 @@ RadioElement.propTypes = {
options: PropTypes.object.isRequired,
disabled: PropTypes.bool,
required: PropTypes.bool,
vertical: PropTypes.bool,
checked: PropTypes.string.isRequired,
errorMessage: PropTypes.string,
elementClass: PropTypes.string,
Expand All @@ -2665,6 +2666,7 @@ RadioElement.propTypes = {
RadioElement.defaultProps = {
disabled: false,
required: false,
vertical: false,
errorMessage: '',
elementClass: 'row form-group',
onUserInput: function() {
Expand Down