-
-
Notifications
You must be signed in to change notification settings - Fork 63
feat: add native cascade dismiss api #452
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
base: main
Are you sure you want to change the base?
Conversation
|
@obi-owner is attempting to deploy a commit to the Jovanni's projects Team on Vercel. A member of the Team first needs to authorize it. |
lodev09
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far. Just need to retain the dismiss name on the native instead of the old dismissAll. This should make methods consistent in the native too. Just add code comment so it's clear.
| dismiss: async () => { | ||
| const sheetsAbove = bottomSheetContext?.getSheetsAbove(sheetName) ?? []; | ||
|
|
||
| // Dismiss all sheets above sequentially since gorhom/bottom-sheet doesn't support cascade dismiss | ||
| for (const sheet of sheetsAbove) { | ||
| await bottomSheetContext?.dismissDirect(sheet); | ||
| } | ||
|
|
||
| // Then dismiss this sheet | ||
| await dismissInternal(); | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try calling dismissChildren here first before itself?
|
Also, I think |
Summary
dismiss()is calleddismissChildren()method to only dismiss the children presented on top of the current sheetThis must be merged before #444
Type of Change
Test Plan
Screenshots / Videos
Checklist