Open edtownend opened 5 years ago
@edtownend have the exact same issue with our app doing the exact same thing. the toast.text()
class blows away my actions, icons, and classes
Same issue, please let me know if you have found the miracle solution since
Hi, Can I pick this up?
For anyone still interested, I found a solution, by ammending the .change code to replace the content of text node of the container, rather than replacing the entire interior via .innerHTML
node.childNodes[0].nodeValue = text;
rather than 'node.innerHTML = text`
Hi, first, thanks for a great plugin!
I've got a toast containing a countdown that is updated every second using
toast.text(newText);
. The issue is that this replaces the entire content of the toast, including the icon and any actions on the toast.As a workaround I've switched to wrapping the content I wish to replace in a and then replace just that via
toast.el.getElementsByClassName('classname')[0].innerHTML = 'new content';
. But, I don't know if I'm causing any other issues by updating the DOM directly. I suggest that the text method is updated to only alter the text content of the toast.