Skip to content

Commit 4b42261

Browse files
committed
Fix text editing bug ref GC-82
1 parent de656cc commit 4b42261

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ui/util/editable_text.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ pub fn EditableText(
4141
if !new_text.is_empty() {
4242
on_commit.call(new_text);
4343
}
44-
draft.set(text()); // keep text or reset if invalid
44+
// spawn so memo chain has updated after commit
45+
spawn(async move { draft.set(text()) }); // reset on empty text or commit failure
4546
mode.set(InputMode::Edit);
4647
};
4748

0 commit comments

Comments
 (0)