Skip to content

resolved toast.promise ignores ToastContainer prop closeOnClick #920

@mrudowski

Description

@mrudowski

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

What is the current behavior?
in version higher then 9.0.8 the resolved toast.promise ignores the ToastContainer closeOnClick prop
<ToastContainer closeOnClick={true} />

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
here a complete codesandbox example:
https://codesandbox.io/s/toast-promise-ou0dkj?file=/src/App.jsx

What is the expected behavior?
I think it should not ignore it, and worked just like in 9.0.8:

  • when loading it cannot be clicked and dissmised at all
  • when resolved (success or error) it can be close on click

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions