From 1800b6bea15aec2f1138d2bc5894261a543bee52 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 28 Nov 2021 20:13:08 +0100 Subject: [PATCH] components/member-list: re-render on State.users update --- components/member-list.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/member-list.js b/components/member-list.js index 3457fac..07ff67d 100644 --- a/components/member-list.js +++ b/components/member-list.js @@ -13,7 +13,8 @@ class MemberItem extends Component { shouldComponentUpdate(nextProps) { return this.props.nick !== nextProps.nick - || this.props.membership !== nextProps.membership; + || this.props.membership !== nextProps.membership + || this.props.user !== nextProps.user; } handleClick(event) { @@ -105,7 +106,8 @@ function sortMembers(a, b) { export default class MemberList extends Component { shouldComponentUpdate(nextProps) { - return this.props.members !== nextProps.members; + return this.props.members !== nextProps.members + || this.props.users !== nextProps.users; } render() {