diff --git a/forms-flow-web/src/components/Form/Steps/WorkFlow.js b/forms-flow-web/src/components/Form/Steps/WorkFlow.js index 09867a7aa9..cd83f61f5c 100644 --- a/forms-flow-web/src/components/Form/Steps/WorkFlow.js +++ b/forms-flow-web/src/components/Form/Steps/WorkFlow.js @@ -14,6 +14,7 @@ import ViewAndEditTaskvariable from "./ViewAndEditTaskvariable"; import { useTranslation } from "react-i18next"; import { listProcess } from "../../../apiManager/services/formatterService"; import { DEFAULT_WORKFLOW } from "../../../constants/taskConstants"; +import { filterSelectOptionByLabel } from "../../../helper/helper"; const WorkFlow = React.memo( ({ @@ -137,6 +138,7 @@ const WorkFlow = React.memo( updateTaskvariableToProcessData(updatedData); }; + useEffect(() => { if (!workflow) { setModified(true); @@ -228,6 +230,7 @@ const WorkFlow = React.memo( onChange={(selectedOption) => handleListChange(selectedOption)} isDisabled={disableWorkflowAssociation} inputId="select-workflow" + filterOption={filterSelectOptionByLabel} getOptionLabel={(option) => ( {option.label} diff --git a/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js b/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js index a6e24b8e49..eb779364b1 100644 --- a/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js +++ b/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js @@ -53,6 +53,7 @@ import { resetFormProcessData, } from "../../../../apiManager/services/processServices"; import { fetchUserList } from "../../../../apiManager/services/bpmTaskServices"; +import { filterSelectOptionByLabel } from "../../../../helper/helper"; const initialValueOfTaskAttribute = { applicationId: true, @@ -691,6 +692,7 @@ export default function CreateNewFilterDrawer({ onChange={(selectedOption) => { setDefinitionKeyId(selectedOption?.label); }} + filterOption={filterSelectOptionByLabel} inputId="select-workflow" getOptionLabel={(option) => ( diff --git a/forms-flow-web/src/helper/helper.js b/forms-flow-web/src/helper/helper.js index 5f3665658c..9f16a9bf07 100644 --- a/forms-flow-web/src/helper/helper.js +++ b/forms-flow-web/src/helper/helper.js @@ -48,4 +48,11 @@ const renderPage = (formStatus, processLoadError) => { ); } }; -export { replaceUrl, addTenantkey, removeTenantKey, textTruncate, renderPage }; + +const filterSelectOptionByLabel = (option, searchText) => { + return option.data.label.toLowerCase().includes(searchText.toLowerCase()); +}; + + +export { replaceUrl, addTenantkey, removeTenantKey, textTruncate, renderPage, + filterSelectOptionByLabel};