From 00dd3164c969ed64a9187aa46bfbc63e42e0f430 Mon Sep 17 00:00:00 2001 From: "kasia.oczkowska" Date: Thu, 20 Jun 2024 14:48:51 +0100 Subject: [PATCH] Revert "feat: persist parameters values in FlowSubstep (#1505)" This reverts commit 017a8814944575afd37fa0616377cb248a3d75e2. --- .../web/src/components/FlowSubstep/index.jsx | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/web/src/components/FlowSubstep/index.jsx b/packages/web/src/components/FlowSubstep/index.jsx index 69810db7..55bb5cd6 100644 --- a/packages/web/src/components/FlowSubstep/index.jsx +++ b/packages/web/src/components/FlowSubstep/index.jsx @@ -5,13 +5,11 @@ import Collapse from '@mui/material/Collapse'; import ListItem from '@mui/material/ListItem'; import Button from '@mui/material/Button'; import Stack from '@mui/material/Stack'; -import isEqual from 'lodash/isEqual'; import { EditorContext } from 'contexts/Editor'; import FlowSubstepTitle from 'components/FlowSubstepTitle'; import InputCreator from 'components/InputCreator'; import FilterConditions from './FilterConditions'; import { StepPropType, SubstepPropType } from 'propTypes/propTypes'; -import { usePrevious } from 'hooks/usePrevious'; function FlowSubstep(props) { const { @@ -21,27 +19,13 @@ function FlowSubstep(props) { onCollapse, onSubmit, step, - onChange, } = props; - - const prevStep = usePrevious(step); - const { name, arguments: args } = substep; const editorContext = React.useContext(EditorContext); const formContext = useFormContext(); const validationStatus = formContext.formState.isValid; const onToggle = expanded ? onCollapse : onExpand; - React.useEffect(() => { - return () => { - if (!isEqual(prevStep?.parameters, formContext.getValues('parameters'))) { - onChange({ - step: { ...step, parameters: formContext.getValues('parameters') }, - }); - } - }; - }, []); - return (