diff --git a/core/api.txt b/core/api.txt index 67d49417556..cf780364c5e 100644 --- a/core/api.txt +++ b/core/api.txt @@ -1086,6 +1086,7 @@ ion-modal,prop,leaveAnimation,((baseEl: any, opts?: any) => Animation) | undefin ion-modal,prop,mode,"ios" | "md",undefined,false,false ion-modal,prop,presentingElement,HTMLElement | undefined,undefined,false,false ion-modal,prop,showBackdrop,boolean,true,false,false +ion-modal,prop,snapBreakpoints,number[] | undefined,undefined,false,false ion-modal,prop,trigger,string | undefined,undefined,false,false ion-modal,method,dismiss,dismiss(data?: any, role?: string) => Promise ion-modal,method,getCurrentBreakpoint,getCurrentBreakpoint() => Promise diff --git a/core/src/components/modal/gestures/sheet.ts b/core/src/components/modal/gestures/sheet.ts index 86cf6978c23..7f42e24c4d6 100644 --- a/core/src/components/modal/gestures/sheet.ts +++ b/core/src/components/modal/gestures/sheet.ts @@ -75,7 +75,7 @@ export const createSheetGesture = ( BACKDROP_KEYFRAMES: backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop, CONTENT_KEYFRAMES: [ { offset: 0, maxHeight: '100%' }, - { offset: 1, maxHeight: '0%'}, + { offset: 1, maxHeight: '0%' }, ], }; @@ -91,11 +91,12 @@ export const createSheetGesture = ( const backdropAnimation = animation.childAnimations.find((ani) => ani.id === 'backdropAnimation'); let contentAnimation: Animation | undefined; if (snapBreakpoints.length > 0) { - contentAnimation = - animation.addAnimation( - createAnimation('contentAnimation') - .addElement(contentEl!.parentElement!) - .keyframes(SheetDefaults.CONTENT_KEYFRAMES)) + contentAnimation = animation + .addAnimation( + createAnimation('contentAnimation') + .addElement(contentEl!.parentElement!) + .keyframes(SheetDefaults.CONTENT_KEYFRAMES) + ) .childAnimations.find((ani) => ani.id === 'contentAnimation'); } @@ -374,7 +375,10 @@ export const createSheetGesture = ( * re-enabled. Native iOS allows for scrolling on the sheet modal as soon * as the gesture is released, so we align with that. */ - if (contentEl && (snapToBreakpoint === breakpoints[breakpoints.length - 1] || snapBreakpoints.includes(snapToBreakpoint))) { + if ( + contentEl && + (snapToBreakpoint === breakpoints[breakpoints.length - 1] || snapBreakpoints.includes(snapToBreakpoint)) + ) { contentEl.scrollY = true; } diff --git a/core/src/components/modal/modal.tsx b/core/src/components/modal/modal.tsx index 28354e73eda..951f25b18b0 100644 --- a/core/src/components/modal/modal.tsx +++ b/core/src/components/modal/modal.tsx @@ -142,7 +142,7 @@ export class Modal implements ComponentInterface, OverlayInterface { * The difference between `breakpoints` and `snapBreakpoints` is that `snapBreakpoints` * allows the content to scroll, and the modal will only be draggable by the handle. */ - @Prop() snapBreakpoints?: number[]; + @Prop() snapBreakpoints?: number[]; /** * A decimal value between 0 and 1 that indicates the