Emit "mounted" event on child views#31
Open
UhhhWaitWhat wants to merge 3 commits intoripplejs:masterfrom
UhhhWaitWhat:#30
Open
Emit "mounted" event on child views#31UhhhWaitWhat wants to merge 3 commits intoripplejs:masterfrom UhhhWaitWhat:#30
UhhhWaitWhat wants to merge 3 commits intoripplejs:masterfrom
UhhhWaitWhat:#30
Conversation
|
@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., |
Contributor
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to this documentation, a
mountedevent 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 amountedevent 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.