Skip to content

Commit

Permalink
Update text content in store upon clicking outside of text
Browse files Browse the repository at this point in the history
  • Loading branch information
low-earth-orbit committed Oct 1, 2024
1 parent 4982792 commit 7f87263
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/text/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
};
Expand Down

0 comments on commit 7f87263

Please sign in to comment.