feat(models): collapsed schema content should be clickable (#6942)

This commit is contained in:
Mahtis Michel
2021-02-17 01:02:55 +01:00
committed by GitHub
parent 1082aba7bb
commit 0e6dc0487c

View File

@@ -90,7 +90,11 @@ export default class ModelCollapse extends Component {
<span onClick={ this.toggleCollapsed } className="pointer">
<span className={ "model-toggle" + ( this.state.expanded ? "" : " collapsed" ) }></span>
</span>
{ this.state.expanded ? this.props.children :this.state.collapsedContent }
{
this.state.expanded
? this.props.children
: <span onClick={this.toggleCollapsed} className="pointer">{this.state.collapsedContent}</span>
}
</span>
)
}