diff --git a/src/pipelines/pipeline-editor.tsx b/src/pipelines/pipeline-editor.tsx index a37cedc..6e31e18 100644 --- a/src/pipelines/pipeline-editor.tsx +++ b/src/pipelines/pipeline-editor.tsx @@ -17,10 +17,7 @@ import { useConfirm } from "material-ui-confirm"; import { useSnackbar } from "notistack"; import { not, omit } from "ramda"; import { ChangeEvent, FC } from "react"; -import { - Pipeline, - PipelineUnits, -} from "../generated/graphql"; +import { Pipeline, PipelineUnits } from "../generated/graphql"; import { useHeaderContainer } from "../layouts"; import { CREATE_PIPELINE, DELETE_PIPELINE, UPDATE_PIPELINE } from "./mutations"; import * as Yup from "yup"; @@ -269,6 +266,13 @@ const ScriptsField: FC = ({ field, form, meta, ...props }) => { meta={meta} field={{ ...field, + onBlur: (ev: React.FocusEvent) => { + form.setFieldValue( + field.name, + field.value.filter((it: string) => !!it) + ); + return field.onBlur(ev); + }, value: field.value?.join("\n") ?? "", onChange: (ev: ChangeEvent) => form.setFieldValue(