Skip to content

Fix Toast not swipable when rendered with children. #3023

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

Merged
merged 3 commits into from
Apr 10, 2024

Conversation

nitzanyiz
Copy link
Collaborator

@nitzanyiz nitzanyiz commented Apr 9, 2024

Description

This fixes an issue where the pan view in not rendered when the toast is rendered with children making in unswipable

Changelog

Toast - fix PanView not rendered with children.

Additional info

MADS-4134

@nitzanyiz nitzanyiz requested a review from M-i-k-e-l April 10, 2024 09:12
@nitzanyiz nitzanyiz marked this pull request as ready for review April 10, 2024 09:12
{renderMessage()}
{renderRightElement()}
</View>
{content}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I'd do something like:

{children ??
<View style={[styles.toastContent, style, backgroundColor ? {backgroundColor} : undefined]}>
        {renderIcon()}
        {renderMessage()}
        {renderRightElement()}
      </View>}

@nitzanyiz nitzanyiz requested a review from M-i-k-e-l April 10, 2024 10:51
@nitzanyiz nitzanyiz enabled auto-merge (squash) April 10, 2024 10:53
@nitzanyiz nitzanyiz merged commit c4098b8 into master Apr 10, 2024
@nitzanyiz nitzanyiz deleted the fix/ToastNotSwipable branch April 10, 2024 10:55
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

Successfully merging this pull request may close these issues.

2 participants