Skip to content

Commit

Permalink
Fixed - Fieldset shows empty legend
Browse files Browse the repository at this point in the history
  • Loading branch information
mcandu committed Sep 12, 2020
1 parent 377d2f3 commit b99cc6b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/fieldset/Fieldset.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,13 @@ export class Fieldset extends Component {

renderLegend(collapsed) {
const legendContent = this.renderLegendContent(collapsed);

return (
<legend className="p-fieldset-legend p-unselectable-text" onClick={this.toggle}>
{legendContent}
</legend>
);
if (this.props.legend != null || this.props.toggleable) {
return (
<legend className="p-fieldset-legend p-unselectable-text" onClick={this.toggle}>
{legendContent}
</legend>
);
}
}

render() {
Expand Down

0 comments on commit b99cc6b

Please sign in to comment.