Использую библиотеку
React-bootstrap и там есть Collapse элемент
render() {
return (
<div>
<Button onClick={ ()=> this.setState({ open: !this.state.open })}>
click
</Button>
<Collapse in={this.state.open}>
<div>
<Well>
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid.
Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
</Well>
</div>
</Collapse>
</div>
);
}
И все замечательно работает
Но я пытаюсь сделать инпут селект и что бы событие (открывается доп поле) начиналось, когда пользователь выбирает элемент в форме.
export class UserFirstForm extends Component {
constructor(...args) {
super(...args);
this.state = {
};
}
handleChange() {
this.setState({
});
}
render() {
const searchButton =<Button bsSize="xsmall">Let's Search</Button>;
return (
<div>
<form>
<Input type="select" label="Please select who the Activity is in relation to:" placeholder="select">
<option value="Patient">Patient</option>
...
<option value="other" selected={this.handleChange}>Other</option>
</Input>
<myCollaps/>
</form>
Помогите разобраться