i'm trying to provide the panel content as an HTMLElement into the option "content" and i get a modal with the variable type in its body.

Im getting the content by document.getElementById('my-content') as an HTMLDivElement and providing directly into modal options.
If I try the content retrieved by document.getElementById('my-content').innerHTML as a String, it works but it looses the collapse effect eventhough the binding is right for those elements.
i'm trying to provide the panel content as an HTMLElement into the option "content" and i get a modal with the variable type in its body.
Im getting the content by
document.getElementById('my-content')as an HTMLDivElement and providing directly into modal options.If I try the content retrieved by
document.getElementById('my-content').innerHTMLas a String, it works but it looses the collapse effect eventhough the binding is right for those elements.