mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-12-01 11:57:09 -05:00
components/member-list: re-render on State.users update
This commit is contained in:
parent
fcce340846
commit
1800b6bea1
1 changed files with 4 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue