drop icon indicating copy to clipboard operation
drop copied to clipboard

Updating content

Open lmcardle opened this issue 8 years ago • 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?

lmcardle avatar Apr 06 '16 05:04 lmcardle

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.

dhritzkiv avatar Apr 22 '16 15:04 dhritzkiv

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

josephrocca avatar May 02 '16 04:05 josephrocca

@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).

nunofaria11 avatar May 02 '16 16:05 nunofaria11