From 9f5ed344f4443721273ddb0381c1088fe7db166c Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Mon, 9 Apr 2018 17:11:58 +0200 Subject: [PATCH] [#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 --- ui/src/pages/Messages.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/pages/Messages.js b/ui/src/pages/Messages.js index b400785..ee0a2d7 100644 --- a/ui/src/pages/Messages.js +++ b/ui/src/pages/Messages.js @@ -82,7 +82,8 @@ class Messages extends Component { {hasMessages ? (
- this.list = el} + this.list = el} itemRenderer={this.renderMessage} length={messages.length} threshold={1000}