diff --git a/packages/game-app/src/_shared/components/EstimationEditor/EstimationEditor.tsx b/packages/game-app/src/_shared/components/EstimationEditor/EstimationEditor.tsx index 16fb94a7..0f0788fb 100644 --- a/packages/game-app/src/_shared/components/EstimationEditor/EstimationEditor.tsx +++ b/packages/game-app/src/_shared/components/EstimationEditor/EstimationEditor.tsx @@ -54,8 +54,14 @@ const EstimationEditor: React.FC = ({ ); useEffect(() => { - inputRef?.current?.focus(); - }, []); + setEstimation(initialEstimation || ''); + }, [initialEstimation]); + + useEffect(() => { + if (state === 'open') { + inputRef?.current?.focus(); + } + }, [state]); return (