Skip to content

Commit

Permalink
feat(helper-text): remove helper text when invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed Apr 15, 2020
1 parent db2a3df commit cecc972
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/react/src/components/ComboBox/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export default class ComboBox extends React.Component {
<div className={wrapperClasses}>
{title}
{input}
{helper}
{invalid ? null : helper}
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export default class Dropdown extends React.Component {
);
}}
</Downshift>
{!inline && helper}
{!inline && !invalid ? helper : null}
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export default class FilterableMultiSelect extends React.Component {
<div className={wrapperClasses}>
{title}
{input}
{!inline && helper}
{!inline && !invalid ? helper : null}
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/MultiSelect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export default class MultiSelect extends React.Component {
<div className={wrapperClasses}>
{title}
{input}
{!inline && helper}
{!inline && !invalid ? helper : null}
</div>
);
}
Expand Down

0 comments on commit cecc972

Please sign in to comment.