I've added some if conditions in the below Modal example however when the content is rendered I'd need to scroll the Modal down.
https://www.lightningdesignsystem.com/components/modals/
Is there a way to dynamically set the Modal height based on the content rendered?
Best Answer
I had similar problem. In my case it was a picklist with long list of options. slds-modal design specifications(here) says they have not done anything to accomodate content with a dynamic height and it would always add a scroll bar.
But but, there is a hack. which worked for me.
PS: I see this question was asked an year ago. I happen to come across while searching for solution. And I found one solution myself which I'm sharing