diff --git a/frontend/components/application/applicationLayout/BooleanTextarea.component.tsx b/frontend/components/application/applicationLayout/BooleanTextarea.component.tsx index 2ea4d11f..c63a93db 100644 --- a/frontend/components/application/applicationLayout/BooleanTextarea.component.tsx +++ b/frontend/components/application/applicationLayout/BooleanTextarea.component.tsx @@ -2,11 +2,13 @@ import RadioGroup from "@/components/common/Radio.component"; import Txt from "@/components/common/Txt.component"; +import { MAX_TEXT_LENGTH } from "@/src/constants"; import type { ApplicationBooleanTextarea, ApplicationQuestion, } from "@/src/constants/application/type"; import { useLocalStorage } from "@/src/hooks/useLocalstorage.hook"; +import { FormEvent } from "react"; interface TextAreaProps { node: { @@ -21,6 +23,9 @@ interface TextAreaProps { const TextArea = ({ node }: TextAreaProps) => { const [textValue, setTextValue] = useLocalStorage(node.name, ""); + const onInput = (e: FormEvent) => { + setTextValue(e.currentTarget.value.slice(0, MAX_TEXT_LENGTH)); + }; return (
@@ -32,15 +37,16 @@ const TextArea = ({ node }: TextAreaProps) => { {node.subtitle}
-
+