React-toastify: toast.isActive will always return false when using multiContainer

Created on 5 Aug 2019  路  5Comments  路  Source: fkhadra/react-toastify

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

What is the current behavior?
toast.isActive(someId) will always return false when using multiContainer

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:

https://codesandbox.io/s/reactreduxreact-toastify-x9kvk
Click update and check console.

What is the expected behavior?
Return proper active state of toast

bug

Most helpful comment

Hey the v5.4.1 fix the issue.

All 5 comments

It seems to be related to the order the containers are rendered. The function isActive seems to always consider only the last container instance.

If in the given reproduction, the "second" containerId is used in the toast, the function seems to work properly.

Hello guys,

Sorry for the late reply. This is a known bug, not hard to solve at all. I'll try to work on the next release ASAP.

Thanks for adding and addressing this issue @fkhadra. 馃槑

Just ran into this issue and am looking forward to a resolution! Thank you @fkhadra for this wonderful library.

Hey the v5.4.1 fix the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

billtlee picture billtlee  路  5Comments

joetidee picture joetidee  路  3Comments

spiritedfang picture spiritedfang  路  3Comments

AllyssonAlas picture AllyssonAlas  路  4Comments

albert-olive picture albert-olive  路  5Comments