toast.update() not working?
See original GitHub issueToast Update not working:
… Component omited for brevity …
notifyNewEnterprise(enterprise) {
let toastId = toast.info('Hello', { position: toast.POSITION.TOP_RIGHT });
Enterprises.insert(enterprise, (err) => {
if(!err) {
toast.update(toastId, {
render: 'Enterprise Created Successfully.',
type: toast.TYPE.SUCCESS,
className: css({
transform: "rotateY(360deg)",
transition: "transform 0.6s"
})
});
}
});
}
It just displays Hello Toast it doesn’t change even when the insertion to collection succeed. I’d expect it to update from info toast to success toast but I don’t know why doesn’t. How can I fix it for the intended result? Thanks
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Troubleshooting Toast App Updates
Troubleshooting Toast App Updates · 1. Select Switch User. · 2. Once on the passcode screen tap the three white dots on the...
Read more >Update a toast | React-Toastify - GitHub Pages
Update a toast. When you update a toast, the toast options and the content are inherited but don't worry you can update them...
Read more >why toast.update in React-Toastify v.9 doesn't work properly
You have to set the loading to false for the autoClose to work. So add isLoading: false to the toast.update . toast.update(toast1, {...
Read more >React Toastify Update Bug - CodeSandbox
Forked FromReact (React Toastify Working); Environmentcreate-react-app. Files. public. src. index.js. styles.css. package.json. Dependencies.
Read more >Toast - Chakra UI
Toasts ' options can be updated, by passing an id and the new options to the update instance method. Toast Update last toast....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rezmoth I forked your sandbox with the hotfix:
@maxchehab and @DreadfulDeveloper could you update to the latest version v3.3.4 and see if it fix your issue, please. Don’t forget to clear your cache 😁
Off topic @rezmoth For info the signature of your toast.update is wrong:
Maybe it could be useful to accept both. End off topic
I found a solution but if the update occurs too fast you won’t see the first message.