зеркало из https://github.com/mozilla/treeherder.git
Bug 1725334 - Graphs View - Page does not reset when clicking header fixed (#7259)
* Bug 1725334 - Graphs View - Page does not reset when clicking header fixed * Bug 1725334 - Graphs View - address request changes
This commit is contained in:
Родитель
a22fc05525
Коммит
d75a5fd143
|
@ -55,6 +55,22 @@ class GraphsView extends React.Component {
|
|||
this.checkQueryParams();
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const { location } = this.props;
|
||||
const { testData, loading } = this.state;
|
||||
if (
|
||||
location.search === '' &&
|
||||
testData.length !== 0 &&
|
||||
loading !== true &&
|
||||
location.search !== prevProps.location.search
|
||||
) {
|
||||
// eslint-disable-next-line react/no-did-update-set-state
|
||||
this.setState({
|
||||
testData: [],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getDefaultTimeRange = () => {
|
||||
const { location } = this.props;
|
||||
const { timerange } = parseQueryParams(location.search);
|
||||
|
|
Загрузка…
Ссылка в новой задаче