Answer the question
In order to leave comments, you need to log in
How to make Collapse an element that listens not to a button, but to Input type="select"?
I am using the React-bootstrap library and there is a Collapse element
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>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question