-
Notifications
You must be signed in to change notification settings - Fork 13.3k
feat(modal): expose snapBreakpoint on swipe-to-close modals #31002
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: major-9.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -308,6 +308,7 @@ export const createSwipeToCloseGesture = ( | |||||
| deltaY: detail.deltaY, | ||||||
| velocityY: detail.velocityY, | ||||||
| progress: calculateProgress(el, detail.deltaY), | ||||||
| snapBreakpoint: shouldComplete ? 0 : 1, | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This also follows the convention we use for other booleans on public event details, such as One more change to go with it: please add the field to /**
* Whether the card modal will dismiss when the drag gesture ends.
* `true` if the gesture passed the dismiss threshold, `false` if the
* modal will remain open.
*/
isDismissing?: boolean; |
||||||
| }; | ||||||
|
|
||||||
| onDragEnd(eventDetail); | ||||||
|
|
||||||
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.
Adding this variable changes the
ionDragEnddetail length, so the existing assertion inmodal-card.e2e.tswill fail. Please update the expected length there.