components icon indicating copy to clipboard operation
components copied to clipboard

'maxWidth' does not exist in type 'MatDialogConfig'

Open navalgandhi1989 opened this issue 9 years ago • 6 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Should be able to set maxHieght and maxWidth of DailogBox

What is the current behavior?

Getting error while compilation

Argument of type '{ maxHeight: string; maxWidth: string; data: { id: number; }; }' is not assignable to parameter of type 'MatDialogConfig'. Object literal may only specify known properties, and 'maxHeight' does not exist in type 'MatDialogConfig'.

What are the steps to reproduce?

Trying to open the dialog like this

this.dialog.open(MyDialog, {
maxHeight: '95%',
maxWidth: '60%', data: { id: myId}
});

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.4.6 Material 2.0.0-beta.12 OS Windows TypeScript 2.3.4 Browser Chrome

navalgandhi1989 avatar Oct 27 '17 16:10 navalgandhi1989

Those properties were added on master but not yet included in a public release. Looks like the documentation of accidentally updated too soon. This will be resolved with the next release. Closing since there's not actually any code changes necessary to fix.

jelbourn avatar Oct 27 '17 17:10 jelbourn

Thanks for the Prompt Reply. BTW really good work on the Components :-)

navalgandhi1989 avatar Oct 27 '17 19:10 navalgandhi1989

When is the Material 2.0.0-beta.13 due ?

raed667 avatar Nov 08 '17 10:11 raed667

It's out, and it's not a beta anymore, it's 5.0.0-rc0

dushkostanoeski avatar Nov 08 '17 10:11 dushkostanoeski

Guess 13 is an avoidable number 🤣
Thanks i'll give it a shot

raed667 avatar Nov 08 '17 10:11 raed667

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.