From ac38cfefc9f9abd044674d3616c78bb1ecd605d7 Mon Sep 17 00:00:00 2001 From: Jon Herron Date: Wed, 16 Nov 2022 16:31:58 -0500 Subject: [PATCH] lint --- .../components/ProcessInstanceListTable.tsx | 42 ++++++++----------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx index b77f4fbae..217b04253 100644 --- a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx @@ -233,32 +233,24 @@ export default function ProcessInstanceListTable({ } }); - Object.keys(parametersToGetFromSearchParams).forEach( - (paramName: string) => { - if (paramName === 'process_model_identifier') { - setProcessModelSelection(null); - processModelAvailableItems.forEach((item: any) => { - if (item.id === filters.process_model_identifier) { - setProcessModelSelection(item); - } - }); - } else if (paramName === 'process_status') { - const processStatusSelectedArray: string[] = []; - setProcessStatusSelection(processStatusSelectedArray); - if (!filters.process_status) { - return; - } - PROCESS_STATUSES.forEach((processStatusOption: any) => { - const regex = new RegExp(`\\b${processStatusOption}\\b`); - if (filters.process_status.match(regex)) { - processStatusSelectedArray.push(processStatusOption); - } - }); - setProcessStatusSelection(processStatusSelectedArray); - setShowFilterOptions(true); - } + setProcessModelSelection(null); + processModelAvailableItems.forEach((item: any) => { + if (item.id === filters.process_model_identifier) { + setProcessModelSelection(item); } - ); + }); + + const processStatusSelectedArray: string[] = []; + if (filters.process_status) { + PROCESS_STATUSES.forEach((processStatusOption: any) => { + const regex = new RegExp(`\\b${processStatusOption}\\b`); + if (filters.process_status.match(regex)) { + processStatusSelectedArray.push(processStatusOption); + } + }); + setShowFilterOptions(true); + } + setProcessStatusSelection(processStatusSelectedArray); }, [ processInstanceFilters, parametersToAlwaysFilterBy,