We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How the Dialog's css max-height is being calculated?

Hello,

   How is css max-height is being calculated? Or maybe we can just remove the max-height because I have a dynamic data being populated inside the Dialog which is inside a component. In my dialog which has a fixed height, the max-height is different from the one that has a dynamic values. So it would turn out the dialog that has dynamic value has small max-height. It cannot even be manipulated with the height attribute of the dialog.

Thanks,
   User

3 Replies

IS Indrajith Srinivasan Syncfusion Team January 8, 2020 08:17 AM

Hi, 
 
Greetings from Syncfusion support 
 
Query 1: css max-height calculation  
 
The Max-Height for the dialog is calculated based on the target. If the target is not set specified externally, the dialog consider ‘document.body’ as target and calculated max-height based on it. So, we ensure whether the target of Dialog has proper height on open the Dialog.

Query 2: remove the max-height
 
 
Yes, you can prevent the MaxHeight for the Dialog in the OnOpen event, So, the dialog is rendered based on the given height and stopped the automatic calculation of max-height. 
 
<DialogEvents OnOpen="@beforeOpen"></DialogEvents> 
 
private void beforeOpen(BeforeOpenEventArgs args) 
{ 
    args.MaxHeight = null; 
} 
 
 
Could you please try out the above solution and confirm whether it resolves your reported issue? 
 
Regards, 
Indrajith 



J j January 8, 2020 10:26 AM

Okay, that's cool. Thank you.


IS Indrajith Srinivasan Syncfusion Team January 9, 2020 12:45 AM

Hi,  
  
Thanks for your update. Please get back to us if you need further assistance on this. 
  
Regards,  
Indrajith 


Loader.
Live Chat Icon For mobile
Up arrow icon