From 4e01de9e395bff36d2d1ab8834b42ef77a79ee48 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Fri, 23 Jun 2023 19:18:31 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(inputListComponent):=20set?= =?UTF-8?q?=20inputList=20state=20to=20value=20prop=20on=20value=20prop=20?= =?UTF-8?q?change=20to=20fix=20inputList=20not=20updating=20on=20prop=20ch?= =?UTF-8?q?ange=20=F0=9F=94=92=20chore(utils.ts):=20add=20random=20number?= =?UTF-8?q?=20to=20getRandomKeyByssmm=20function=20to=20reduce=20the=20cha?= =?UTF-8?q?nce=20of=20key=20collision?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/components/inputListComponent/index.tsx | 5 +++++ src/frontend/src/utils.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/components/inputListComponent/index.tsx b/src/frontend/src/components/inputListComponent/index.tsx index 951d7a7ed..245ea93f0 100644 --- a/src/frontend/src/components/inputListComponent/index.tsx +++ b/src/frontend/src/components/inputListComponent/index.tsx @@ -19,6 +19,11 @@ export default function InputListComponent({ onChange([""]); } }, [disabled, onChange]); + + useEffect(() => { + setInputList(value); + }, [value]); + return (