Skip to content

Commit

Permalink
fix: Don't save label filter in local storage (argoproj#4022)
Browse files Browse the repository at this point in the history
  • Loading branch information
simster7 committed Sep 14, 2020
1 parent 0123c9a commit 9f12062
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ interface State {
interface WorkflowListRenderOptions {
paginationLimit: number;
selectedPhases: string[];
selectedLabels: string[];
}

const allBatchActionsEnabled: Actions.OperationDisabled = {
Expand Down Expand Up @@ -72,8 +71,7 @@ export class WorkflowsList extends BasePage<RouteComponentProps<any>, State> {
}
return {
paginationLimit: 0,
selectedPhases: [],
selectedLabels: []
selectedPhases: []
} as WorkflowListRenderOptions;
}

Expand All @@ -89,7 +87,7 @@ export class WorkflowsList extends BasePage<RouteComponentProps<any>, State> {
},
namespace: this.props.match.params.namespace || '',
selectedPhases: this.queryParams('phase').length > 0 ? this.queryParams('phase') : savedOptions.selectedPhases,
selectedLabels: this.queryParams('label').length > 0 ? this.queryParams('label') : savedOptions.selectedLabels,
selectedLabels: this.queryParams('label'),
selectedWorkflows: new Map<string, models.Workflow>(),
batchActionDisabled: {...allBatchActionsEnabled}
};
Expand Down Expand Up @@ -255,10 +253,6 @@ export class WorkflowsList extends BasePage<RouteComponentProps<any>, State> {
private get options() {
const options: WorkflowListRenderOptions = {} as WorkflowListRenderOptions;
options.selectedPhases = this.state.selectedPhases;
options.selectedLabels = [];
this.state.selectedLabels.forEach(label => {
options.selectedLabels.push(label);
});
if (this.state.pagination.limit) {
options.paginationLimit = this.state.pagination.limit;
}
Expand Down

0 comments on commit 9f12062

Please sign in to comment.