diff --git a/src/features/AdminPage/NewStreetcode/TextBlock/TextForm/AdditionTextBlock/AdditionalTextBlockAdminForm.component.tsx b/src/features/AdminPage/NewStreetcode/TextBlock/TextForm/AdditionTextBlock/AdditionalTextBlockAdminForm.component.tsx index b6346b743..52c715345 100644 --- a/src/features/AdminPage/NewStreetcode/TextBlock/TextForm/AdditionTextBlock/AdditionalTextBlockAdminForm.component.tsx +++ b/src/features/AdminPage/NewStreetcode/TextBlock/TextForm/AdditionTextBlock/AdditionalTextBlockAdminForm.component.tsx @@ -34,16 +34,19 @@ const AdditionalTextBlockAdminForm = ({ setIsTitleEmpty(!inputInfo?.title || inputInfo.title === ""); }, [inputInfo?.title]); + + const handleEditorChange = (editor: string) => { + setInputInfo((prev) => ({ ...prev, additionalText: editor })); + onChange('additionalText', editor); + }; + return (
{ - setInputInfo({ ...inputInfo, additionalText: editor }); - onChange('additionalText', editor); - }} + onChange={handleEditorChange} maxChars={maxLength} readOnly={isTitleEmpty || isTextContentEmpty} />