Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported onClose function #50

Open
durdevic opened this issue Dec 14, 2020 · 2 comments
Open

Exported onClose function #50

durdevic opened this issue Dec 14, 2020 · 2 comments

Comments

@durdevic
Copy link

When having a custom onPress action on the toast, would be nice to be able to call directly onClose function, instead of clicking the "close" button for it

e.g.

toast({
            duration: 4000,
            message: `Moved to ${toFolder.title}`,
            iconName: 'check',
            iconColor: 'closeIconColor',
            accentColor: 'success',
            subMessage: 'View folder',
            onPress: () => {
                    customAction()
                    onToastDismiss();
              }
        });
@jeanverster
Copy link
Owner

Hi @durdevic, you shouldn't need to close the Toast as the onClose gets called when you trigger the onPress

@durdevic
Copy link
Author

durdevic commented Dec 17, 2020

Hi 👋 Somehow for me it just get's minimised and persists until the duration is over.

I am navigating to another screen with react-native-navigation. Could that perhaps cause a problem?

Example:

Screen Recording 2020-12-17 at 15 45 06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants