Select Ant-Material how to on change show hidden input on React
I have a specific issue. I need an additional input to appear on selection. I already wrote something, but it doesn't work.
[![asdasdasd][1]][1] my code i need show it in main page
<SelectOption
title="asdasd"
// onChange={value => setFormSearch(prevState => ({...prevState, optionsOfSelect: value})) }
// name={'options'}
onChange={(e) => (handleShowHide(e))}
// options={optionsForm?.currency || []}
/>
{
showHide ==="1" && (
<InputText
/>
)
}
const OnlineRecord = ({
// setFormSearch
// optionsForm
}) => {
const[showHide, setShowHide] = useState("")
const handleShowHide = (event) => {
const getuser = event.target.value
console.log(getuser);
}
select option component
const SelectOption = ({
title = 'Титул',
name = 'Empty',
onChange,
options,
value,
mode,
error
}) => {
return (
<div className={style.item__select}>
<p>{title}</p>
<Select
placeholder="Выбрать"
className={clsx(style.select__option, error && style.select__option__error)}
bordered={false}
onChange={(value, options) => onChange(value, options)}
mode={mode && 'multiple'}
value={value}
>
{options?.map((option, index) => (
<Option
key={`${option.id}_${index}`}
value={option.id}
name={name}
>
{option.name}
</Option>
))}
</Select>
</div>
);
};
]2