diff --git a/src/frontend/src/components/inputListComponent/index.tsx b/src/frontend/src/components/inputListComponent/index.tsx index a54b4151f..7a691f74c 100644 --- a/src/frontend/src/components/inputListComponent/index.tsx +++ b/src/frontend/src/components/inputListComponent/index.tsx @@ -13,12 +13,6 @@ export default function InputListComponent({ }: InputListComponentType) { const [inputList, setInputList] = useState(value ?? [""]); - useEffect(() => { - if (value) { - setInputList(value); - } - }, [value]); - useEffect(() => { if (disabled) { setInputList([""]); @@ -48,7 +42,7 @@ export default function InputListComponent({ placeholder="Type something..." onChange={(e) => { setInputList((old) => { - let newInputList = _.cloneDeep(old); + let newInputList = _.cloneDeep(inputList); newInputList[idx] = e.target.value; return newInputList; });