question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autoclose not working if progressbar hidden via display non

See original GitHub issue

Do you want to request a feature or report a bug? Bug

What is the current behavior? Toast not autocloses if progress bar is hidden via display: none. Hiding it by default method (opacity) is not working because of IE11 flexbug (https://github.com/philipwalton/flexbugs/issues/111).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
craigkovatchcommented, Apr 8, 2020

FYI I am solving the problem without importing CSS by using TypeStyle, although any CSS injection tool will do:

const progressClassName = TypeStyle.style({
  animation: `${TypeStyle.keyframes({
    from: { transform: 'scaleX(1)' },
    to: { transform: 'scaleX(0)' },
  })} linear 1 forwards`
});

toast.configure({
  autoClose: 5000,
  hideProgressBar: true,
  progressClassName, // necessary for autoClose to work properly due to implementation details of react-toastify
});
0reactions
puopgcommented, Apr 20, 2022

I must agree, an element that must be rendered in the page that we can easily remove using css affecting the behavior of the toast is wild. I was scratching my head as to what was going on.

Please document this somewhere in the autoClose section: https://fkhadra.github.io/react-toastify/autoClose

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set up an independent progress bar - Stack Overflow
Is there a way to implement an bar that progresses on top of a calculation, independently and continuously, for a fixed amount of...
Read more >
Use progress bar from python - 3D Slicer Community
I would like to add a progress bar in the UI. Is there any way to work with a progressbar info from python?...
Read more >
QProgressDialog — Qt for Python - Qt Documentation
Resets the progress dialog. The progress dialog becomes hidden if autoClose() is true. This property holds whether the dialog gets hidden by reset()...
Read more >
How to style | React-Toastify - GitHub Pages
#Override existing css classes. If overriding the css variables is not enough for you, you can override the existing CSS classes. Below, a...
Read more >
User and Workspace Settings - Visual Studio Code
As an example, let's hide the Activity Bar from VS Code. The Activity Bar is the ... If you prefer to always work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found