From 19b874b591c814ca5bae1c685995757121a8bfac Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Fri, 21 Jul 2023 11:34:23 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(genericModal/index.tsx):?= =?UTF-8?q?=20refactor=20useEffect=20hook=20to=20set=20input=20value=20whe?= =?UTF-8?q?n=20'value'=20prop=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/modals/genericModal/index.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/frontend/src/modals/genericModal/index.tsx b/src/frontend/src/modals/genericModal/index.tsx index 9d11b5bdf..a3b214c6b 100644 --- a/src/frontend/src/modals/genericModal/index.tsx +++ b/src/frontend/src/modals/genericModal/index.tsx @@ -96,6 +96,12 @@ export default function GenericModal({ } }, [inputValue, type]); + useEffect(() => { + setInputValue(value) + }, [value]) + + + const coloredContent = (inputValue || "") .replace(//g, ">")