NativeBase
NativeBase copied to clipboard
Custom Toast isn't passed with onClose props despite the document saying so
Description
The onClose
method is needed to close the toast prematurely.
CodeSandbox/Snack link
https://github.com/GeekyAnts/NativeBase/blob/6161d8814cee624f9856906f53f53a9508c55a55/src/components/composites/Toast/Toast.tsx#L222
Steps to reproduce
No response
NativeBase Version
3.4.8
Platform
- [ ] Android
- [ ] CRA
- [X] Expo
- [ ] iOS
- [ ] Next
Other Platform
No response
Additional Information
The code can be changed to
component = render({ id, onClose: () => Toast.close(id) });
Hi @Looooong, Thank you for reporting the issue. We will look into it and fix it at the earliest.
Same problem here! Any solution or workaround on this?
Can you use removeToast(id)
?