diff --git a/src/components/floatingLabelInput.tsx b/src/components/floatingLabelInput.tsx index ccda850..9aec32b 100644 --- a/src/components/floatingLabelInput.tsx +++ b/src/components/floatingLabelInput.tsx @@ -17,9 +17,15 @@ export default function FloatingLabelInput({ onChange, }: FloatingLabelInputProps) { const [showPassword, setShowPassword] = useState(false); + const [selectedValue, setSelectedValue] = useState(defaultValue || ''); const handleChange = (e: React.ChangeEvent) => { const value = e.target.value; + + if (type === 'select') { + setSelectedValue(value); + } + if (onChange) { onChange(value); } @@ -34,7 +40,8 @@ export default function FloatingLabelInput({