From 7f87263a2a2d8a5376337244dd703f22b69f4718 Mon Sep 17 00:00:00 2001 From: Leo Hong <5917188+low-earth-orbit@users.noreply.github.com> Date: Tue, 1 Oct 2024 19:35:01 -0300 Subject: [PATCH] Update text content in store upon clicking outside of text --- components/text/TextField.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/text/TextField.tsx b/components/text/TextField.tsx index 89fae09..8bafc66 100644 --- a/components/text/TextField.tsx +++ b/components/text/TextField.tsx @@ -165,7 +165,11 @@ export default function TextField({ const handleOutsideClick = (e: any) => { if (e.target !== textarea) { - node.text(textarea.value); + onChange({ + ...selectedProps, + text: textarea.value, + }); // Update text content + removeTextarea(); } };