-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to force a modal to stay mounted? #2160
Comments
Disable |
@taion That prop does nothing for the modal component. I see it in the docs for tabs, though. |
Any update? I have the same need. |
We really need keepMounted prop for temporary hidden modal to persist inner state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, I am starting a new application and it's my first time working with react-bootstrap.
The first thing I did was to build a login modal, which uses react-facebook-login and react-google-login. Presumably, both of these components make external API calls upon mounting.
So, I threw these two components into my modal and went along my way. Then I noticed these external Facebook and Google scripts were getting loaded into a page multiple times, because the modal was unmounting and mounting every time it was hidden/shown. To me that seems very counterintuitive; I would expect the markup to remain in place and merely animate it's display/visibility on the
open
prop.Regardless, I need a way to produce a modal that mounts once and subsequently hides/shows itself without remounting. Is this possible with react-bootstrap in any capacity? I'd hate to have to go back to material-ui just for a modal.
The text was updated successfully, but these errors were encountered: