Skip to content

Commit

Permalink
fix(FormGroup): allow disable when tag is fieldset (#1547)
Browse files Browse the repository at this point in the history
fieldset allows the disabled attribute and has special handling in the browser.
This change will allow the disabled prop to be passed through when the tag is a fieldset

fixes #1546
  • Loading branch information
TheSharpieOne committed Jun 26, 2019
1 parent ae6fe93 commit 0736f80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/FormGroup.js
Expand Up @@ -37,6 +37,10 @@ const FormGroup = (props) => {
check && inline ? 'form-check-inline' : false,
check && disabled ? 'disabled' : false
), cssModule);

if (Tag === 'fieldset') {
attributes.disabled = disabled;
}

return (
<Tag {...attributes} className={classes} />
Expand Down

0 comments on commit 0736f80

Please sign in to comment.