-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When creating a bottom sheet, you cannot pass height
, minHeight
, maxHeight
to the sheet as it throws an error:
Object literal may only specify known properties, and 'maxHeight' does not exist in type 'MatBottomSheetConfig<BottomSheetInjectedData>'.
Object literal may only specify known properties, and 'mixHeight' does not exist in type 'MatBottomSheetConfig<BottomSheetInjectedData>'.
Object literal may only specify known properties, and 'height' does not exist in type 'MatBottomSheetConfig<BottomSheetInjectedData>'.
this.matRef = this.bottomSheet.open(MyComponent, {
height: '80vh',
minHeight: '200px',
maxHeight: `50vh`,
});
However, when used with @ts-ignore
, the properties works as expected.
Reproduction
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-fzwkec?file=src%2Fmain.ts
Steps to reproduce:
- Remove the
// @ts-ignore
line - An error is thrown
Expected Behavior
These properties should be acceptable.
Actual Behavior
These properties throw errors unless // @ts-ignore
is used.
Environment
- Angular: ^17.2.0
- CDK/Material: ^17.2.0
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS