I'm struggling with this code. I have a ternary operator within a fat arrow function, but for some reason it's not working. There are no errors in browserify or the console, but the headers are not being printed.
If I remove the {} and ternary operator, everything works as expected.
What am I missing here?
<Row className="grid-header">
{
this.props.columnsInfo.map((info) => {
width = (info.colWidth) ? "className={info.colWidth}" : "xs={this.calculateColumnSize()}";
<Col style={{ paddingTop: 10, paddingLeft: 10 }} key={info.header} width>{info.header}</Col>
})
}
</Row>