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 39b6075436..17efca611d 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, @@ -117,6 +117,8 @@ function EditStepDialog({ ); } +const EditStepDialog = forwardRef(EditStepDialogWithRef); + EditStepDialog.propTypes = { allTasks: PropTypes.object, deleteTask: PropTypes.func, @@ -134,4 +136,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 f488b5adc9..991c7ddbe0 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({ @@ -136,4 +138,4 @@ function onSubmit(e) { return false; } -export default forwardRef(NewTaskDialog); +export default NewTaskDialog;