diff --git a/src/core/components/Input/InputSelect/InputSelect.stories.tsx b/src/core/components/Input/InputSelect/InputSelect.stories.tsx index 57472f9..e1e2876 100644 --- a/src/core/components/Input/InputSelect/InputSelect.stories.tsx +++ b/src/core/components/Input/InputSelect/InputSelect.stories.tsx @@ -39,6 +39,7 @@ export const Default = (props: InputSelectProps) => { label = {props.label ?? "레이블"} placeholder = {props.placeholder ?? "메뉴 선택"} options = {options} + value = {currentValue} onChange = {onChangeHandler} /> ); diff --git a/src/core/components/Input/InputSelect/index.tsx b/src/core/components/Input/InputSelect/index.tsx index f6043c6..4227f2d 100644 --- a/src/core/components/Input/InputSelect/index.tsx +++ b/src/core/components/Input/InputSelect/index.tsx @@ -8,6 +8,7 @@ const InputSelect = forwardRef(( { options, placeholder, + value, ...props }: InputSelectProps, ref: React.Ref, @@ -17,7 +18,7 @@ const InputSelect = forwardRef(( const { label, rootClassName, className, onChange, required, ...rest } = props; const onChangeHandler = (e: React.ChangeEvent) => { - !isSelectedValue &&setIsSelectedValue(true); + !isSelectedValue && setIsSelectedValue(true); onChange?.(e); }; @@ -32,7 +33,7 @@ const InputSelect = forwardRef(( ref = {ref} className = {clsx( "text-subhead-02-regular outline-none cursor-pointer", - !isSelectedValue ? "text-gray-05" : "text-gray-08", + !value && !isSelectedValue ? "text-gray-05" : "text-gray-08", className, )} onChange = {onChangeHandler}