Fix header buttons rerender
This commit is contained in:
parent
eeb6647133
commit
8ae8fa7525
|
@ -97,7 +97,8 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
|
|||
|
||||
shouldComponentUpdate(nextProps: IRightButtonsProps, nextState: IRigthButtonsState) {
|
||||
const { isFollowingThread, tunread, tunreadUser, tunreadGroup } = this.state;
|
||||
const { teamId, status, joined, omnichannelPermissions, theme, issuesWithNotifications, notificationsDisabled } = this.props;
|
||||
const { teamId, status, joined, omnichannelPermissions, theme, disabled, issuesWithNotifications, notificationsDisabled } =
|
||||
this.props;
|
||||
if (nextProps.teamId !== teamId) {
|
||||
return true;
|
||||
}
|
||||
|
@ -110,6 +111,9 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
|
|||
if (nextProps.theme !== theme) {
|
||||
return true;
|
||||
}
|
||||
if (nextProps.disabled !== disabled) {
|
||||
return true;
|
||||
}
|
||||
if (nextState.isFollowingThread !== isFollowingThread) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue