X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/4bb9d50b428773c4712e8eebdb6756f45efb06f6..64b25cb874d430f23d169606265c9534a52bdc6c:/src/store/run-process-panel/run-process-panel-reducer.ts?ds=sidebyside diff --git a/src/store/run-process-panel/run-process-panel-reducer.ts b/src/store/run-process-panel/run-process-panel-reducer.ts index 0f220419..560e91cd 100644 --- a/src/store/run-process-panel/run-process-panel-reducer.ts +++ b/src/store/run-process-panel/run-process-panel-reducer.ts @@ -33,7 +33,13 @@ export const runProcessPanelReducer = (state = initialState, action: RunProcessP inputs: getWorkflowInputs(parseWorkflowDefinition(selectedWorkflow)) || [], }), SET_WORKFLOWS: workflows => ({ ...state, workflows, searchWorkflows: workflows }), - SEARCH_WORKFLOWS: term => ({ ...state, searchWorkflows: state.workflows.filter(workflow => workflow.name.includes(term)) }), + SEARCH_WORKFLOWS: term => { + const termRegex = new RegExp(term, 'i'); + return { + ...state, + searchWorkflows: state.workflows.filter(workflow => termRegex.test(workflow.name)), + }; + }, RESET_RUN_PROCESS_PANEL: () => ({ ...initialState, processOwnerUuid: state.processOwnerUuid }), default: () => state }); \ No newline at end of file