NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Custom Toast isn't passed with onClose props despite the document saying so

Open Looooong opened this issue 2 years ago • 3 comments

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) });

Looooong avatar Jul 20 '22 16:07 Looooong

Hi @Looooong, Thank you for reporting the issue. We will look into it and fix it at the earliest.

Krithikj20 avatar Jul 21 '22 08:07 Krithikj20

Same problem here! Any solution or workaround on this?

Linkmetal avatar Aug 18 '22 08:08 Linkmetal

Can you use removeToast(id) ?

twocs avatar Jun 09 '23 05:06 twocs