diff --git a/app/pages/lab-pages-editor/components/TasksPage/components/EditStepDialog/EditStepDialog.jsx b/app/pages/lab-pages-editor/components/TasksPage/components/EditStepDialog/EditStepDialog.jsx index 4d80a16667..3502d4bc79 100644 --- a/app/pages/lab-pages-editor/components/TasksPage/components/EditStepDialog/EditStepDialog.jsx +++ b/app/pages/lab-pages-editor/components/TasksPage/components/EditStepDialog/EditStepDialog.jsx @@ -13,7 +13,7 @@ const taskNames = { const DEFAULT_HANDLER = () => {}; -function EditStepDialog({ +function EditStepDialogWithRef({ allTasks = {}, deleteTask, enforceLimitedBranchingRule, @@ -114,6 +114,8 @@ function EditStepDialog({ ); } +const EditStepDialog = forwardRef(EditStepDialogWithRef); + EditStepDialog.propTypes = { allTasks: PropTypes.object, deleteTask: PropTypes.func, @@ -133,4 +135,4 @@ function onSubmit(e) { return false; } -export default forwardRef(EditStepDialog); +export default EditStepDialog; diff --git a/app/pages/lab-pages-editor/components/TasksPage/components/NewTaskDialog.jsx b/app/pages/lab-pages-editor/components/TasksPage/components/NewTaskDialog.jsx index 801f868868..1e4135b4ac 100644 --- a/app/pages/lab-pages-editor/components/TasksPage/components/NewTaskDialog.jsx +++ b/app/pages/lab-pages-editor/components/TasksPage/components/NewTaskDialog.jsx @@ -7,7 +7,7 @@ import TaskIcon from '../../../icons/TaskIcon.jsx'; const DEFAULT_HANDLER = () => {}; -function NewTaskDialog({ +function NewTaskDialogWithRef({ addTask = DEFAULT_HANDLER, enforceLimitedBranchingRule, openEditStepDialog = DEFAULT_HANDLER, @@ -122,6 +122,8 @@ function NewTaskDialog({ ); } +const NewTaskDialog = forwardRef(NewTaskDialogWithRef); + NewTaskDialog.propTypes = { addTask: PropTypes.func, enforceLimitedBranchingRule: PropTypes.shape({ @@ -138,4 +140,4 @@ function onSubmit(e) { return false; } -export default forwardRef(NewTaskDialog); +export default NewTaskDialog;