fix wrongly showing insular instance callout

This commit is contained in:
Tao Bror Bojlén 2019-07-23 16:59:32 +03:00
parent 64e55c54a1
commit c4e925fdb4
No known key found for this signature in database
GPG Key ID: C6EC7AAB905F9E6F
1 changed files with 4 additions and 2 deletions

View File

@ -118,8 +118,10 @@ class InstanceScreenImpl extends React.PureComponent<IInstanceScreenProps, IInst
this.processEdgesToFindNeighbors();
}
public componentDidUpdate(prevProps: IInstanceScreenProps, prevState: IInstanceScreenState) {
if (prevProps.instanceName !== this.props.instanceName) {
public componentDidUpdate(prevProps: IInstanceScreenProps) {
const isNewInstance = prevProps.instanceName !== this.props.instanceName;
const receivedNewEdges = !!this.props.graph && !this.state.isProcessingNeighbors && !this.state.neighbors;
if (isNewInstance || receivedNewEdges) {
this.processEdgesToFindNeighbors();
}
}