HubSpot/drop

Updating content

Opened this issue · 3 comments

Once the drop is created, I do not see a way to update the content, without destroying and recreating the drop. Any chance I am missing how to update the content after the drop has been created?

I, too, would like to know. I believe the documentation is wrong, as it suggests to affect the content property and then call the position() method. However, this has no effect after calling open() (which I would assume take the content property and update its DOM element.

I just tried: dropInstance.content.innerHTML = "my new content"; and it seems to work fine. Am I missing something?

@lmcardle maybe after calling open() the drop content is dynamically copied to another DOM container in order to apply its UI transformations? So setting innerHTML after it is open would do no good. Don't know if it helps but, I worked around this using angular and compiling the drop content did what I needed (so data-bindings take care of content changes).