File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
core/src/components/modal Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,12 @@ export const createSheetGesture = (
122122 * @param footer - The footer to show
123123 */
124124 const swapFooterVisibility = ( footer : 'original' | 'cloned' ) => {
125- const originalFooter = baseEl . querySelector ( 'ion-footer' ) as HTMLIonFooterElement ;
125+ const originalFooter = baseEl . querySelector ( 'ion-footer' ) as HTMLIonFooterElement | null ;
126+
127+ if ( ! originalFooter ) {
128+ return ;
129+ }
130+
126131 const clonedFooter = wrapperEl . nextElementSibling as HTMLIonFooterElement ;
127132 const footerToHide = footer === 'original' ? clonedFooter : originalFooter ;
128133 const footerToShow = footer === 'original' ? originalFooter : clonedFooter ;
Original file line number Diff line number Diff line change @@ -131,15 +131,14 @@ export class Modal implements ComponentInterface, OverlayInterface {
131131 @Prop ( ) breakpoints ?: number [ ] ;
132132
133133 /**
134- * Determines whether or not the sheet modal will only
135- * scroll/drag the content when fully expanded. This
136- * will only take effect when the `breakpoints` and
137- * `initialBreakpoint` properties are set.
134+ * Controls whether scrolling or dragging within the sheet modal expands
135+ * it to a larger breakpoint. This only takes effect when `breakpoints`
136+ * and `initialBreakpoint` are set.
138137 *
139- * If the value is `true`, the modal will only scroll
140- * when fully expanded.
141- * If the value is `false`, the modal will scroll at
142- * any breakpoint .
138+ * If `true`, scrolling or dragging anywhere in the modal will first expand
139+ * it to the next breakpoint. Once fully expanded, scrolling will affect the content .
140+ * If `false`, scrolling will always affect the content, and the modal will only expand
141+ * when dragging the header or handle .
143142 */
144143 @Prop ( ) expandToScroll = true ;
145144
You can’t perform that action at this time.
0 commit comments