Open pgee70 opened 7 years ago
I'm sorry not sure what you mean the examples work fine for me
I can tell you i took an hour to get your code working from scratch - reporting these errors are to help your repo work better for others without giving up.
you don't have a link to bootstrap. show= this.state.open literally gives an error reporting that it is not instantiated, because it isn't, that is why it should be set before the render method is called - the constructor seems like a good spot.
again, which examples? because these: https://github.com/jquense/react-bootstrap-modal/tree/master/docs/examples are all working for me
go to https://github.com/jquense/react-bootstrap-modal
look for Use
ah ok, yeah, sorry about that. the Readme code is just thrown together to illustrate the Modal component API not to be a working example. please feel free to PR a fix toake the example copy and pasteable
@pgee70 I am facing the same issues. Would you mind providing a fully working example of your solution?
this module isn't working either. I tried @pgee70 's suggested edits and the modal does not show
I was facing the same problem... It happened because I installed the latest version of bootstrap, I had to back with the version 3.3.7.
Is there any movement on this issue?
I had to revert back to 3.3.7 to get this to work, but I love cards.
It doesn't support bootstrap v4, not likely to change in the near future
I do happily accept PRs :)
How can I use this Modal on Bootstrap V4?
I found solution later - react-bootstrap4-modal. It was best solution for me.
your example code doesn't link to bootstrap css. the standard bootstrap modal styling has a default for display:none; which needs to be overwritten using:
.modal{ display:block; }
The button doesnt have a click handler and the state.open isn't set in render it should be instantiated before that it there is a warning if rendering to the document.body - it is preferred to render to tag, eg