Stas Kurilin Stas Kurilin - 1 year ago 92
React JSX Question

Composing material table from custom rows

I want to wrap each of my rows in table with dedicated component so that it would have structure like


instead of


However, after doing it selection checkbox disappears.

Any advices how that could be fixed?

Answer Source
var MyRow = React.createClass({
    render: function () {
        return <TableRow {...this.props}>
        <TableRowColumn>Randal White</TableRowColumn>

Just needs to have the props re-applied to the child elements in the same way that the TableBody component does.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download