From 1ec50a2f27a3085541c7cb16ebc712495d0c2ce2 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Sun, 31 Dec 2023 12:07:07 -0300 Subject: [PATCH] Fixed infinite saving when input was connected --- src/frontend/src/components/inputComponent/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index 2e7bc2394..0efd29c0d 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -24,10 +24,10 @@ export default function InputComponent({ const refInput = useRef(null); // Clear component state useEffect(() => { - if (disabled) { + if (disabled && value !== "") { onChange(""); } - }, [disabled, onChange]); + }, [disabled]); return (