{"action":"created","issue":{"url":"https://api.github.com/repos/fkhadra/react-toastify/issues/274","repository_url":"https://api.github.com/repos/fkhadra/react-toastify","labels_url":"https://api.github.com/repos/fkhadra/react-toastify/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/fkhadra/react-toastify/issues/274/comments","events_url":"https://api.github.com/repos/fkhadra/react-toastify/issues/274/events","html_url":"https://github.com/fkhadra/react-toastify/issues/274","id":379413729,"node_id":"MDU6SXNzdWUzNzk0MTM3Mjk=","number":274,"title":"Prevent duplicate with custom toastId - buggy toast appears that does not auto-close.","user":{"login":"JanuszBartosz","id":20279196,"node_id":"MDQ6VXNlcjIwMjc5MTk2","avatar_url":"https://avatars0.githubusercontent.com/u/20279196?v=4","gravatar_id":"","url":"https://api.github.com/users/JanuszBartosz","html_url":"https://github.com/JanuszBartosz","followers_url":"https://api.github.com/users/JanuszBartosz/followers","following_url":"https://api.github.com/users/JanuszBartosz/following{/other_user}","gists_url":"https://api.github.com/users/JanuszBartosz/gists{/gist_id}","starred_url":"https://api.github.com/users/JanuszBartosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanuszBartosz/subscriptions","organizations_url":"https://api.github.com/users/JanuszBartosz/orgs","repos_url":"https://api.github.com/users/JanuszBartosz/repos","events_url":"https://api.github.com/users/JanuszBartosz/events{/privacy}","received_events_url":"https://api.github.com/users/JanuszBartosz/received_events","type":"User","site_admin":false},"labels":[{"id":477598357,"node_id":"MDU6TGFiZWw0Nzc1OTgzNTc=","url":"https://api.github.com/repos/fkhadra/react-toastify/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"fkhadra","id":5574267,"node_id":"MDQ6VXNlcjU1NzQyNjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5574267?v=4","gravatar_id":"","url":"https://api.github.com/users/fkhadra","html_url":"https://github.com/fkhadra","followers_url":"https://api.github.com/users/fkhadra/followers","following_url":"https://api.github.com/users/fkhadra/following{/other_user}","gists_url":"https://api.github.com/users/fkhadra/gists{/gist_id}","starred_url":"https://api.github.com/users/fkhadra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkhadra/subscriptions","organizations_url":"https://api.github.com/users/fkhadra/orgs","repos_url":"https://api.github.com/users/fkhadra/repos","events_url":"https://api.github.com/users/fkhadra/events{/privacy}","received_events_url":"https://api.github.com/users/fkhadra/received_events","type":"User","site_admin":false},"assignees":[{"login":"fkhadra","id":5574267,"node_id":"MDQ6VXNlcjU1NzQyNjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5574267?v=4","gravatar_id":"","url":"https://api.github.com/users/fkhadra","html_url":"https://github.com/fkhadra","followers_url":"https://api.github.com/users/fkhadra/followers","following_url":"https://api.github.com/users/fkhadra/following{/other_user}","gists_url":"https://api.github.com/users/fkhadra/gists{/gist_id}","starred_url":"https://api.github.com/users/fkhadra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkhadra/subscriptions","organizations_url":"https://api.github.com/users/fkhadra/orgs","repos_url":"https://api.github.com/users/fkhadra/repos","events_url":"https://api.github.com/users/fkhadra/events{/privacy}","received_events_url":"https://api.github.com/users/fkhadra/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-11-10T11:16:27Z","updated_at":"2018-11-23T11:22:14Z","closed_at":null,"author_association":"NONE","body":"Hello!\r\nI am trying to prevent showing duplicated toasts using custom toastId. I am using autoClose option (2000ms).  After multiple calls to e.g. toast.error() with same toastId feature works perfectly - only the first toast is being displayed. However, when autoClose time is finished and toast is ready to be closed - calling the toast.error() function results with showing the same toast once again, but this time with no autoClose timer. I deducted from experiments, that this occurs precisely when toast function is called **during closing animation** of the previous toast. Here is CodeSandbox snippet - to reproduce just start hitting 'Toast' button near active toast timer finish. \r\n\r\n[![Edit 7j5r23pykj](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/7j5r23pykj)\r\n\r\nThis bug does not appear when I am using isActive() function to prevent duplicates, however combining isActive() and setting custom toastId still causes above unwanted behaviour. For the design reasons it is important for me to be able to prevent duplicates using custom toastId, cause managing auto generated ids will quickly become quite a pain.\r\n\r\nisActive() version:\r\n[![Edit jp5wprpyz5](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/jp5wprpyz5)\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/fkhadra/react-toastify/issues/comments/441216316","html_url":"https://github.com/fkhadra/react-toastify/issues/274#issuecomment-441216316","issue_url":"https://api.github.com/repos/fkhadra/react-toastify/issues/274","id":441216316,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTIxNjMxNg==","user":{"login":"raRaRa","id":4303914,"node_id":"MDQ6VXNlcjQzMDM5MTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4303914?v=4","gravatar_id":"","url":"https://api.github.com/users/raRaRa","html_url":"https://github.com/raRaRa","followers_url":"https://api.github.com/users/raRaRa/followers","following_url":"https://api.github.com/users/raRaRa/following{/other_user}","gists_url":"https://api.github.com/users/raRaRa/gists{/gist_id}","starred_url":"https://api.github.com/users/raRaRa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raRaRa/subscriptions","organizations_url":"https://api.github.com/users/raRaRa/orgs","repos_url":"https://api.github.com/users/raRaRa/repos","events_url":"https://api.github.com/users/raRaRa/events{/privacy}","received_events_url":"https://api.github.com/users/raRaRa/received_events","type":"User","site_admin":false},"created_at":"2018-11-23T11:22:14Z","updated_at":"2018-11-23T11:22:14Z","author_association":"NONE","body":"Same issue here. After the toast disappears automatically and I try to show it again quickly after, then it won't show up with animation and autoClose doesn't work on it, and the progress bar doesn't show up. This only happens if I try to show the toast again quickly after the first one auto closes.\r\n\r\n```\r\n            if (!toast.isActive('designer_refresh')) {\r\n                toast('test', {\r\n                    toastId: 'designer_refresh',\r\n                    position: 'top-right',\r\n                    autoClose: 2000,\r\n                    hideProgressBar: false,\r\n                    closeOnClick: true,\r\n                    // pauseOnHover: true,\r\n                    draggable: true,\r\n                    className: 'notificationToolTip',\r\n                });\r\n            }\r\n```\r\n"}}
{"actor":{"display_login":"raRaRa"}}