[ML] Singel Metric Viewer: Fix full refresh check. (#55726)

Fixes the check whether to do a full refresh of the page or not. lastRefresh was mistakenly part of the check. This fixes keeping the flyout open for rules editing.
This commit is contained in:
Walter Rafelsberger 2020-01-24 11:22:31 +01:00 committed by GitHub
parent d40269c748
commit ef4b395873
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -965,16 +965,15 @@ export class TimeSeriesExplorer extends React.Component {
!isEqual(previousProps.lastRefresh, this.props.lastRefresh) ||
!isEqual(previousProps.selectedDetectorIndex, this.props.selectedDetectorIndex) ||
!isEqual(previousProps.selectedEntities, this.props.selectedEntities) ||
!isEqual(previousProps.selectedForecastId, this.props.selectedForecastId) ||
previousProps.selectedForecastId !== this.props.selectedForecastId ||
previousProps.selectedJobId !== this.props.selectedJobId
) {
const fullRefresh =
previousProps === undefined ||
!isEqual(previousProps.bounds, this.props.bounds) ||
!isEqual(previousProps.lastRefresh, this.props.lastRefresh) ||
!isEqual(previousProps.selectedDetectorIndex, this.props.selectedDetectorIndex) ||
!isEqual(previousProps.selectedEntities, this.props.selectedEntities) ||
!isEqual(previousProps.selectedForecastId, this.props.selectedForecastId) ||
previousProps.selectedForecastId !== this.props.selectedForecastId ||
previousProps.selectedJobId !== this.props.selectedJobId;
this.loadSingleMetricData(fullRefresh);
}