Skip to content
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

Dismissible on alert does not work #3599

Closed
HStokbro opened this issue Apr 8, 2019 · 2 comments
Closed

Dismissible on alert does not work #3599

HStokbro opened this issue Apr 8, 2019 · 2 comments

Comments

@HStokbro
Copy link

HStokbro commented Apr 8, 2019

This will show a close (x) icon, but clicking it does nothing. It does not dismiss the alert.
It also does not work in the example on https://react-bootstrap.netlify.com/components/alerts/

<Alert variant="danger" dismissible>
{message}
</Alert>
@mxschmitt
Copy link
Member

The dismissible property of the Alert only adds a close button to the Alert. You have to manually implement the onClose function to hide it.

But in my mind, we can add the hide functionality to the examples, like in the Bootstrap 3 examples: https://5c507d49471426000887a6a7--react-bootstrap.netlify.com/components/alerts/

@HStokbro
Copy link
Author

HStokbro commented Apr 8, 2019

Aha.. I did not catch that. Thx.

@HStokbro HStokbro closed this as completed Apr 8, 2019
TurekBot added a commit to TurekBot/react-bootstrap that referenced this issue Apr 21, 2020
The sentence seemed to imply that adding `dismissible` would produce a button that would automatically dismiss the alert. This isn't true, according to my own frustrated efforts as well as issue react-bootstrap#3599 and react-bootstrap#5070.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants