I am unable to make a Modal
from react-bootstrap
to render on the screen. The DOM node is being added to the DOM tree, but it does not want to show on the screen.
This is my code of the class that hosts the Modal, and I am passing the state of another component to it(I want to change this component's state via the Modal
).
class ChangeModal extends React.Component{
constructor(props){
super(props);
}
render(){
return(
<Modal show={this.props.state.showModal} onHide={this.props.close}>
<Modal.Header closeButton>
<Modal.Title>Modal heading</Modal.Title>
</Modal.Header>
<Modal.Body>
<h4>{this.props.state.id}</h4>
</Modal.Body>
<Modal.Footer>
<Button onClick={this.props.close}>Close</Button>
</Modal.Footer>
</Modal>
);
}
}