mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 17:25:50 +03:00
Use bind to take variable value rather than reference: make room directory able to join rooms
This commit is contained in:
parent
4679e005bf
commit
71f5d1f6cb
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ module.exports = React.createClass({
|
|||
if (rooms[i].aliases[0]) name += " (" + rooms[i].aliases[0] + ")";
|
||||
}
|
||||
rows.unshift(
|
||||
<tr key={ rooms[i].room_id } onClick={ function() { self.joinRoom(rooms[i].room_id); } }>
|
||||
<tr key={ rooms[i].room_id } onClick={self.joinRoom.bind(null, rooms[i].room_id)}>
|
||||
<td><img src={ MatrixClientPeg.get().getAvatarUrlForRoom(rooms[i].room_id, 40, 40, "crop") } width="40" height="40" alt=""/> { name }</td>
|
||||
<td>{ rooms[i].topic }</td>
|
||||
<td style={ {'text-align' : 'center'} }>{ rooms[i].num_joined_members }</td>
|
||||
|
|
Loading…
Reference in a new issue