Use list key provided by react-virtualized in UserList

This commit is contained in:
Ken-Håvard Lieng 2017-03-30 04:53:54 +02:00
parent 6a9942a655
commit 007dd3fe63
2 changed files with 22 additions and 23 deletions

File diff suppressed because one or more lines are too long

View File

@ -14,14 +14,13 @@ export default class UserList extends PureComponent {
listRef = el => { this.list = el; }; listRef = el => { this.list = el; };
renderUser = ({ index, style }) => { renderUser = ({ index, style, key }) => {
const { users, tab, openPrivateChat, select } = this.props; const { users, tab, openPrivateChat, select } = this.props;
const user = users.get(index);
return ( return (
<UserListItem <UserListItem
key={user.nick} key={key}
user={user} user={users.get(index)}
tab={tab} tab={tab}
openPrivateChat={openPrivateChat} openPrivateChat={openPrivateChat}
select={select} select={select}