Skip to content

Instantly share code, notes, and snippets.

@faust45
Created October 9, 2014 15:04
Show Gist options
  • Select an option

  • Save faust45/d9cf902a1a89b8a29f62 to your computer and use it in GitHub Desktop.

Select an option

Save faust45/d9cf902a1a89b8a29f62 to your computer and use it in GitHub Desktop.
render: function() {
var channel = getChannel("changed:score");
var inputs = _.map(this.props.end_scores, function(es) {
var channelScore = comp(channel, withId(es.id), value("score"));
var classes = cx({
'end-hammer': es.isHammer,
});
return (
<td className={classes}>
<input
className="string optional form-control score"
type="text"
maxLength="1"
max="8"
tabIndex={es.tabindex}
autofocus="autofocus"
defaultValue={es.score}
onBlur={channelScore} />
</td>
)
});
return (
<tr>
<td className={this.props.color+"-rock"}>
<b>{this.props.team} {this.props.first_hammer && "*"}</b>
</td>
{inputs}
<td>{this.props.total}</td>
</tr>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment