Change method for setting active playlist

This commit is contained in:
Gabriel Augendre 2016-04-23 00:10:56 +02:00
parent 337c7cecae
commit bd2261bed7

View file

@ -74,9 +74,8 @@ var PlaylistBox = React.createClass({
if (this.props.playlists) { if (this.props.playlists) {
playlists = this.props.playlists.map(function (pl) { playlists = this.props.playlists.map(function (pl) {
var id = pl.id; var id = pl.id;
var classes = currentId == id ? "active" : "";
return ( return (
<ListGroupItem href="#" onClick={this.clickOnItem.bind(this, id, pl.owner.id)} className={classes} key={id}>{pl.name}</ListGroupItem> <ListGroupItem href="#" onClick={this.clickOnItem.bind(this, id, pl.owner.id)} active={currentId == id} key={id}>{pl.name}</ListGroupItem>
); );
}, this); }, this);
} }