Skip to content

bug: sheet modal does not support expandToScroll property #30356

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

Closed
3 tasks done
luisbytes opened this issue Apr 12, 2025 · 1 comment · Fixed by #30357
Closed
3 tasks done

bug: sheet modal does not support expandToScroll property #30356

luisbytes opened this issue Apr 12, 2025 · 1 comment · Fixed by #30357
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@luisbytes
Copy link
Contributor

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

@ionitron-bot ionitron-bot bot added the triage label Apr 12, 2025
@thetaPC thetaPC added package: core @ionic/core package type: bug a confirmed bug report labels Apr 14, 2025
@ionitron-bot ionitron-bot bot removed the triage label Apr 14, 2025
github-merge-queue bot pushed a commit that referenced this issue Apr 14, 2025
Issue number: resolves #30356

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
Cannot use expandToScroll property in ModalController.create

## What is the new behavior?
ExpandToScroll can be added without syntax problems

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
@thetaPC
Copy link
Contributor

thetaPC commented Apr 14, 2025

Thanks for the issue! This has been resolved via PR #30357 and will be available in an upcoming release of Ionic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants