Open UhhhWaitWhat opened 10 years ago
@anthonyshort any chance this could be added? Seems like a fairly significant bug & something I just ran into myself.
So it actually works perfectly fine. The key (which is stupidly obvious) is that you need to attach the ripple element to the DOM using one of the view's dom manipulation methods (i.e., view.appendTo(document.body)
).
Yeah you have to use the methods otherwise the events won't be called. I could use mutation observers to see when the element gets added in anyway which would be kinda nice.
According to this documentation, a
mounted
event should be triggered, each time a view enters the DOM.This implies, that each time a view is mounted, each of its child views (attached via
.compose()
) should emit amounted
event as well.Currently this is not the case. I will look into this (I guess it should be fairly straightforward to implement this) and see if I can provide a pull-request, but for now I wanted to know your opinions of this, and if this would be indeed the correct, expected behavior.
Sorry about issue #30, I would have preferred to attach the PR to it, but apparently I am not quite familiar enough with github to do that. Therefore I closed #30 and continue here.