зеркало из https://github.com/mozilla/treeherder.git
Bug 1729425 - Tests View - Page does not reset when clicking header (#7263)
* Bug 1729425 - Tests View - Page does not reset when clicking header fixed * Bug 1729425 - Tests View - added es lint exception + state and props destructuring
This commit is contained in:
Родитель
d75a5fd143
Коммит
3f209ad490
|
@ -33,6 +33,33 @@ class TestsView extends React.PureComponent {
|
|||
this.getTestsOverviewData();
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const { location } = this.props;
|
||||
const { framework, projectsMap, platformsMap } = this.state;
|
||||
|
||||
if (
|
||||
location.search !== prevProps.location.search &&
|
||||
framework !== null &&
|
||||
projectsMap !== false &&
|
||||
platformsMap !== false &&
|
||||
location.search === ''
|
||||
) {
|
||||
// eslint-disable-next-line react/no-did-update-set-state
|
||||
this.setState(
|
||||
{
|
||||
framework: { id: 1, name: 'talos' },
|
||||
projectsMap: false,
|
||||
platformsMap: false,
|
||||
loading: false,
|
||||
results: [],
|
||||
},
|
||||
() => {
|
||||
this.getTestsOverviewData();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
getTestsOverviewData = async () => {
|
||||
const { projects } = this.props;
|
||||
const { framework } = this.state;
|
||||
|
|
Загрузка…
Ссылка в новой задаче