Skip to content

bug: sheet modal does not support expandToScroll property #30356

Closed
@luisbytes

Description

@luisbytes

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

The create method of ModalController does not accept the expandToScroll property because it is missing from the interface. As a result, TypeScript throws an error when trying to pass it as an option.

Expected Behavior

The create method of ModalController should accept the expandToScroll property as part of the options interface, allowing developers to enable this behavior when creating a modal. TypeScript should recognize the property without errors, and the modal should expand based on its scrollable content when expandToScroll is set to true.

Steps to Reproduce

  1. Create a modal using ModalController.create().
  2. Attempt to pass the expandToScroll property in the options:
this.modalController.create({
  component: MyComponent,
  expandToScroll: false
});

Code Reproduction URL

https://stackblitz.com/edit/8ucszipk

Ionic Info

Ionic:

Ionic CLI : 7.2.0
Ionic Framework : @ionic/angular 8.5.4
@angular-devkit/build-angular : 19.2.7
@angular-devkit/schematics : not installed
@angular/cli : 19.2.7
@ionic/angular-toolkit : 12.2.0

Capacitor:

Capacitor CLI : 6.2.1
@capacitor/android : 6.2.1
@capacitor/core : 6.2.1
@capacitor/ios : 6.2.1

Utility:

cordova-res : not installed globally
native-run : not installed globally

System:

NodeJS : v22.11.0
npm : 10.9.0
OS : macOS Unknown

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions