Fixed switching between user lists in system console (#3409)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
11afa405ba
Коммит
5c70635bcd
@@ -43,6 +43,22 @@ export default class UserList extends React.Component {
|
||||
|
||||
componentDidMount() {
|
||||
this.getCurrentTeamProfiles();
|
||||
|
||||
AdminStore.addAllTeamsChangeListener(this.onAllTeamsChange);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.params.team !== this.props.params.team) {
|
||||
this.setState({
|
||||
team: AdminStore.getTeam(nextProps.params.team)
|
||||
});
|
||||
|
||||
this.getTeamProfiles(nextProps.params.team);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
AdminStore.removeAllTeamsChangeListener(this.onAllTeamsChange);
|
||||
}
|
||||
|
||||
onAllTeamsChange() {
|
||||
@@ -144,10 +160,6 @@ export default class UserList extends React.Component {
|
||||
return null;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps) {
|
||||
this.getTeamProfiles(newProps.params.team);
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!this.state.team) {
|
||||
return null;
|
||||
|
||||
Ссылка в новой задаче
Block a user