You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a button to show and then hide a toast with the same ID.
Somehow I can't manually get the toast to hide. I am making sure to use a unique ID, used only for this one toast.
I can update some things like "message" or "type", which are reflected immediately, but even if I update duration to be only 1 second, it still wont go away, until I interact with the screen.
toast.hideAll() also doesnt work until the screen has been touched,
It seems to be something to do with having Debug enabled in chrome... The example given on this repo is through Expo, but we don't use that.
Just like in that link, it fixes itself after Debug is turned off... Not sure how this could be addressed.
There's a big discussion here about this, which could be related: facebook/react-native#5712 (comment)
For me, I create my own custom toast type, but the "toast" parameter passed by ToastProvider has no hide/hideAll etc, but I found a temporary solution, you can call useToast to get your own toast object which has hide/hideAll methods.
I am using a button to show and then hide a toast with the same ID.
Somehow I can't manually get the toast to hide. I am making sure to use a unique ID, used only for this one toast.
I can update some things like "message" or "type", which are reflected immediately, but even if I update duration to be only 1 second, it still wont go away, until I interact with the screen.
toast.hideAll() also doesnt work until the screen has been touched,
I am providing Toast using the alternative way, as shown here:
https://github.com/arnnis/react-native-toast-notifications#--how-to-call-toast-outside-react-components
This is all happening with a button press inside a component.
Any help please?
The text was updated successfully, but these errors were encountered: