зеркало из https://github.com/mozilla/treeherder.git
Bug 1719606 - Alerts View - Page does not reset when clicking header (#7204)
* Address PR request, reset status, framework, hideImprovements, hideDwnToInv, hideAssignedToOthers
This commit is contained in:
Родитель
2d21cc8b62
Коммит
95ae37bd7c
|
@ -71,7 +71,15 @@ class AlertsView extends React.Component {
|
|||
// the user navigates from the id=<alert> view back to the main alerts view
|
||||
// the Validation component won't reset the id (since the query param doesn't exist
|
||||
// unless there is a value)
|
||||
if (params.id !== prevParams.id) {
|
||||
if (
|
||||
params.id !== prevParams.id ||
|
||||
params.status !== prevParams.status ||
|
||||
params.framework !== prevParams.framework ||
|
||||
params.filterText !== prevParams.filterText ||
|
||||
params.hideImprovements !== prevParams.hideImprovements ||
|
||||
params.hideDwnToInv !== prevParams.hideDwnToInv ||
|
||||
params.hideAssignedToOthers !== prevParams.hideAssignedToOthers
|
||||
) {
|
||||
this.setState(
|
||||
{ id: params.id || null, filters: this.getFiltersFromParams(params) },
|
||||
this.fetchAlertSummaries,
|
||||
|
|
|
@ -19,6 +19,15 @@ export default class InputFilter extends React.Component {
|
|||
800,
|
||||
);
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const { filteredTextValue } = this.props;
|
||||
|
||||
if (filteredTextValue !== prevProps.filteredTextValue) {
|
||||
// eslint-disable-next-line react/no-did-update-set-state
|
||||
this.setState({ input: filteredTextValue });
|
||||
}
|
||||
}
|
||||
|
||||
updateInput = (event) => {
|
||||
const { updateFilterText, updateOnEnter } = this.props;
|
||||
const input = event.target.value;
|
||||
|
|
Загрузка…
Ссылка в новой задаче