autoClose doesn't work with react 0.14.*
See original GitHub issueHi,
I’m facing an issue with autoClose. I follow your example, everything works but the toast will never close until triggered manually. I also try your custom animation, The enter event fired, but the exit didn’t.
Here is my code snippet:
– Toast Container settings:
<ToastContainer
position="top-right"
type="error"
autoClose={4000}
/>
– I create a toast by:
toast("Hello", { autoClose: 4000 });
What did I do wrong here?
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (8 by maintainers)
Top Results From Across the Web
Autoclose='outside' doesn't work with multiple menu in react ...
I suspect it's because autoClose only works on the current selected menu, in the example below it works with the main menu and...
Read more >React v0.14 – React Blog
We're happy to announce the release of React 0.14 today! This release has a few major changes, primarily designed to simplify the code...
Read more >react-datepicker - npm
Start using react-datepicker in your project by running `npm i ... newer won't work (due to react-onclickoutside dependencies); React 0.14 or newer: All ......
Read more >Create a Dropdown in React that Closes When the Body is ...
Now we have a problem. If the user clicks outside of the dropdown it will stay open. In order to close the menu...
Read more >react-dd-menu-customized - npm package | Snyk
Learn more about react-dd-menu-customized: package health score, ... Open Issues: 13 ... animate - boolean if the menu should animate on open and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In my case, autoClose was not working because I had not imported all of the CSS files. If you are manually copying the CSS, make sure to include the ProgressBar styles, even if you aren’t actually displaying the progress bar. The component relies on the ProgressBar styling to know when to close the toast (when the ProgressBar animation ends)
@JustFly1984 could you reproduce the issue on codesandbox, so I can help you?
Thanks.