Skip to content

Commit 3c40b2c

Browse files
committed
feat(bottomsheet): ios ignoreKeyboardHeight
1 parent d121d2c commit 3c40b2c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/bottomsheet/bottomsheet-common.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export interface BottomSheetOptions {
3131
ignoreBottomSafeArea?: boolean; // optional ios parameter to bottom safe area. Default is false
3232
disableDimBackground?: boolean; // optional parameter to remove the dim background
3333
skipCollapsedState?: boolean; // optional Android parameter to skip midway state when view is greater than 50%. Default is false
34-
peekHeight?: number // optional Android parameter to set the collapsed sheet height.
34+
peekHeight?: number; // optional Android parameter to set the collapsed sheet height.
35+
ignoreKeyboardHeight: boolean; //(iOS only) A Boolean value that controls whether the height of the keyboard should affect the bottom sheet's frame when the keyboard shows on the screen. (Default: true)
3536
}
3637

3738
export abstract class ViewWithBottomSheetBase extends View {

src/bottomsheet/bottomsheet.ios.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
410410
if (peekHeight) {
411411
(bottomSheet.presentationController as MDCBottomSheetPresentationController).preferredSheetHeight = peekHeight;
412412
}
413-
(bottomSheet.presentationController as MDCBottomSheetPresentationController).ignoreKeyboardHeight = true;
413+
(bottomSheet.presentationController as MDCBottomSheetPresentationController).ignoreKeyboardHeight = options.ignoreKeyboardHeight !== false;
414414

415415
if (options.trackingScrollView) {
416416
const scrollView = this.getViewById(options.trackingScrollView);

0 commit comments

Comments
 (0)