From 118afed1937e19f430d3d2612b84223cb0557e1c Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 24 Dec 2022 05:01:25 -0800 Subject: [PATCH] Check before setting input value --- components/Input/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Input/index.tsx b/components/Input/index.tsx index 6a62dab4..5338f97b 100644 --- a/components/Input/index.tsx +++ b/components/Input/index.tsx @@ -25,7 +25,7 @@ const Input = React.forwardRef(function input( // Change value when prop updates useEffect(() => { - setInputValue(`${props.value}`) + if (props.value) setInputValue(`${props.value}`) }, [props.value]) function handleChange(event: React.ChangeEvent) {