Skip to content

Commit

Permalink
fix: fix simpleTextEditorWidget onChange with fieldName
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Oct 9, 2023
1 parent f1774ca commit 364cc5a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 364cc5a

Please sign in to comment.