After I updated the dependency in my project, I can open the modal fine, but when I press cancel/submit/the close button it doens't close even though when I console.log the state of open (im using it as a class component) it says false.
To Reproduce
Open the modal and then press close. I'm using it to add announcements to a web page. It has a text area and a date and time picker as well but I didn't add that to the request.
Also for some reason when I first press the close or submit button, both console.logs are the same, they give me the same value (true) when I first click the close/submit button, and not true, then false after the state changes. But on subsequent clicks they both give me false, as they should, but the modal is still open.
Expected behavior
I expect the modal to close when I press cancel/submit/close buttons.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Version of react-responsive-modal: [6.1.0]
Version of react: [17.0.2]
Browser version: [Chrome 92.0.4515.159 ]
Additional context
Add any other context about the problem here. This problem only appeared after I updated the dep from 4.1.0 to 6.1.0 and the modal no longer shows as a modal it shows like this.
where as it was showing like this earlier.
To fix your issue you need to import the css file manually, just add import 'react-responsive-modal/styles.css'; somewhere in your code and it should work after this.
Bug report
Describe the bug
After I updated the dependency in my project, I can open the modal fine, but when I press cancel/submit/the close button it doens't close even though when I console.log the state of open (im using it as a class component) it says false.
To Reproduce
Open the modal and then press close. I'm using it to add announcements to a web page. It has a text area and a date and time picker as well but I didn't add that to the request.
<Modal classNames={{overlay: modalStyle.overlay}} open={open} onClose={this.onCloseModal} center>
state component
this.state = { open: false}
My open function.
My close function
Also for some reason when I first press the close or submit button, both console.logs are the same, they give me the same value (true) when I first click the close/submit button, and not true, then false after the state changes. But on subsequent clicks they both give me false, as they should, but the modal is still open.
Expected behavior
I expect the modal to close when I press cancel/submit/close buttons.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here. This problem only appeared after I updated the dep from 4.1.0 to 6.1.0 and the modal no longer shows as a modal it shows like this.
where as it was showing like this earlier.
![image](https://user-images.githubusercontent.com/44781569/131001924-d9d0de7e-ef22-499f-abaa-a2244a87c7df.png)