Adapt Height of Dialog to Content

Hello,

is there a AutoHeight-Feature for the SfDialog. I created a sample application
using the Syncfusion Blazor Templates / WebAssembly and inserted only the
SfDialog control in the project.

With the button "Open" The "About SYNCFUSION succnctly series" Dialog
is opened. But the high is not as high as the content, so I've a vertical scrollbar
in the dialog.

Is it possible, that the dialogs calculates it's height due to the content till a
maximum height e.g. 90% of the browser window?

Alex


3 Replies 1 reply marked as answer

IS Indrajith Srinivasan Syncfusion Team May 13, 2021 01:55 PM UTC

Hi Alexander, 
 
Greetings from Syncfusion support, 
 
We have validated your reported query. By default, the Dialog fits the content based on the target elements height, if the height is not set properly for dialog rendering scrolls will be generated for the content. The reported scenario occurs due to the max-height set for the dialog, which is calculated based on the Dialog Target property. If the Target is not set, the Dialog will consider ‘body’ as target and the max-height will be calculated based on body. We have also prepared a sample, with the Dialog  
 
 
You can also use the Dialog MinHeight property, to show the dialog with desired height irrespective of the target height. Check the above shared sample Counter page for the demo. 
 
Please let us know if the solution helps, 
 
Regards, 
Indrajith 


Marked as answer

FM Franck Mangin January 25, 2024 06:03 PM UTC

In case someone stumbles on this old post, I fixed this issue with

.e-dlg-container > .e-dialog {
max-height: 100% !important;
}

A maxHeight property on the dia



MR Mallesh Ravi Chandran Syncfusion Team January 26, 2024 12:13 PM UTC

Hi Franck , 

Appreciate your update!

Please get back to us for assistance in the future.


Regards,

Mallesh 


Loader.
Up arrow icon