Skip to content

toast.done() not dismissing toast if progress was 0 #853

@fabb

Description

@fabb

This is a bug.

What is the current behavior?

  1. Show a toast with autoClose: false
  2. Call toast.done(toastId)

What is the expected behavior?

The toast should animate the progress bar from 0 to 1 and then dismiss the toast.

What is the actual behavior?

The toast sets the progress bar to 1 without animation, and stays open.

https://codesandbox.io/s/0-done-llxovb?file=/src/App.js

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React 18.2.0 on macOS 12.6 with Chrome 106

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions