From 364cc5a267eace34daf13c99d5d328cf5a2d9e10 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini Date: Mon, 9 Oct 2023 14:15:55 +0200 Subject: [PATCH] fix: fix simpleTextEditorWidget onChange with fieldName --- .../ItaliaTheme/manage/Widgets/SimpleTextEditorWidget.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ItaliaTheme/manage/Widgets/SimpleTextEditorWidget.jsx b/src/components/ItaliaTheme/manage/Widgets/SimpleTextEditorWidget.jsx index f163d6eaf..05b8083e8 100644 --- a/src/components/ItaliaTheme/manage/Widgets/SimpleTextEditorWidget.jsx +++ b/src/components/ItaliaTheme/manage/Widgets/SimpleTextEditorWidget.jsx @@ -85,11 +85,12 @@ const SimpleTextEditorWidget = (props) => { placeholder={placeholder || intl.formatMessage(messages.text)} onInput={(e) => { let retVal = { - value, + value: e.target.textContent, }; if (fieldName) { - retVal = { [fieldName]: value }; + retVal = { [fieldName]: e.target.textContent }; } + onChangeBlock(block, { ...data, ...retVal }); }} onFocus={(e) => {