From 5a4e4c6535543da1602db905516d77d414b8528f Mon Sep 17 00:00:00 2001 From: grapefruit13 Date: Thu, 21 Mar 2024 14:01:49 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20options=EC=9D=98=20value=EA=B0=80?= =?UTF-8?q?=20string=EB=8F=84=20=EB=B0=9B=EC=9D=84=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EA=B2=8C=20=ED=83=80=EC=9E=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/commons/inputs/FormDropdown.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/commons/inputs/FormDropdown.tsx b/src/components/commons/inputs/FormDropdown.tsx index da7c3ab1..5242b85b 100644 --- a/src/components/commons/inputs/FormDropdown.tsx +++ b/src/components/commons/inputs/FormDropdown.tsx @@ -18,7 +18,7 @@ const { url: activeUrl, alt: activeAlt } = SVGS.arrow.down.active; type FormDropdownProps = { name: string; - options: { title: string; value: number }[]; + options: { title: string; value: number | string }[]; label?: string; isSmall?: boolean; isDisabled?: boolean; @@ -29,7 +29,7 @@ export const FormDropdown = ({ name, label = '', options, isSmall = false, isDis const { isOpen, popupRef, buttonRef, togglePopup } = useTogglePopup(); const [currentOptionTitle, setCurrentOptionTitle] = useState(options[0].title); - const handleOptionChange = (title: string, value: number) => { + const handleOptionChange = (title: string, value: number | string) => { setValue(name, value); setCurrentOptionTitle(title); togglePopup();