Skip to content

Commit

Permalink
Don't reset filters after batch actions (#1497)
Browse files Browse the repository at this point in the history
* Don't reset filters on batch actions

* Remove unused import
  • Loading branch information
Alex-Tideman authored Jul 24, 2023
1 parent 92b1d6a commit 2a91c8c
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/lib/pages/workflows-with-new-search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
bulkCancelByIDs,
bulkTerminateByIDs,
} from '$lib/services/batch-service';
import { updateQueryParameters } from '$lib/utilities/update-query-parameters';
import BatchOperationConfirmationModal from '$lib/components/workflow/batch-operation-confirmation-modal.svelte';
import { Action } from '$lib/models/workflow-actions';
import { supportsAdvancedVisibility } from '$lib/stores/advanced-visibility';
Expand Down Expand Up @@ -132,17 +131,6 @@
$refresh = Date.now();
};
const resetPageToDefaultState = () => {
$workflowFilters = [];
updateQueryParameters({
url: $page.url,
parameter: 'query',
value: '',
allowEmpty: true,
});
refreshWorkflows();
};
const terminateWorkflows = async (event: CustomEvent<{ reason: string }>) => {
const options = {
namespace: $page.params.namespace,
Expand All @@ -169,7 +157,7 @@
});
}
batchTerminateConfirmationModal?.close();
resetPageToDefaultState();
refreshWorkflows();
} catch (error) {
batchTerminateConfirmationModal?.setError(
error?.message ?? translate('unknown-error'),
Expand Down Expand Up @@ -203,7 +191,7 @@
});
}
batchCancelConfirmationModal?.close();
resetPageToDefaultState();
refreshWorkflows();
} catch (error) {
batchCancelConfirmationModal?.setError(
error?.message ?? translate('unknown-error'),
Expand Down

0 comments on commit 2a91c8c

Please sign in to comment.