From 74410d764022371ea8b86ef26c76ab1fa3ed4368 Mon Sep 17 00:00:00 2001 From: Mariusz Gumienny Date: Tue, 9 Apr 2024 21:39:22 +0200 Subject: [PATCH] Minor fix in todomvc-react example. (#4830) --- examples/todomvc-react/src/Todo.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/todomvc-react/src/Todo.tsx b/examples/todomvc-react/src/Todo.tsx index 7b228d0888..655d0a5086 100644 --- a/examples/todomvc-react/src/Todo.tsx +++ b/examples/todomvc-react/src/Todo.tsx @@ -39,7 +39,12 @@ export const todoMachine = createMachine({ } }, editing: { - entry: 'focusInput', + entry: [ + assign({ + initialTitle: ({ context }) => context.title + }), + { type: 'focusInput' } + ], on: { blur: { target: 'reading',