[#34] Add key to react list
The list cached the height while switching between applications. We fix this with the use of the key property, that means that react will not reuse the component and make a new one. see https://reactjs.org/docs/reconciliation.html
This commit is contained in:
parent
e28a157122
commit
9f5ed344f4
|
|
@ -82,7 +82,8 @@ class Messages extends Component {
|
|||
{hasMessages
|
||||
? (
|
||||
<div style={{width: '100%'}}>
|
||||
<ReactList ref={(el) => this.list = el}
|
||||
<ReactList key={appId}
|
||||
ref={(el) => this.list = el}
|
||||
itemRenderer={this.renderMessage}
|
||||
length={messages.length}
|
||||
threshold={1000}
|
||||
|
|
|
|||
Loading…
Reference in New Issue