Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
#489 ConnectWS moved to after data fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
damianprzygodzki committed Mar 6, 2017
1 parent 4775270 commit 8d2663a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/app/DocumentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class DocumentList extends Component {
this.setState({
viewId: defaultViewId
});
this.connectWS(defaultViewId);
}

/*
Expand All @@ -122,11 +121,6 @@ class DocumentList extends Component {
}
}

componentDidMount() {
const {viewId} = this.state;
this.connectWS(viewId);
}

componentWillUnmount() {
this.disconnectWS();
}
Expand Down Expand Up @@ -258,7 +252,9 @@ class DocumentList extends Component {
filters: response.data.filters
}, refresh && {
refresh: Date.now()
}))
}), () => {
this.connectWS(response.data.viewId);
})
});
}

Expand Down

0 comments on commit 8d2663a

Please sign in to comment.