-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger itemView.onShow in appendBuffer if collectionView is already shown #866
Trigger itemView.onShow in appendBuffer if collectionView is already shown #866
Conversation
andrewhubbs
commented
Jan 14, 2014
- Fixes CompositeView collection reset bug #865
- Fix bug in collectionView.spec
if (this._isShown) { | ||
_.each(this._bufferedChildren, function (child) { | ||
Marionette.triggerMethod.call(child, "show"); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps after this loop we should set
this._bufferedChildren = [];
to prevent any kind of memory issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy to put the reset code there. I chose to leave it with the reset for the buffer itself for parity. It probably makes more sense to immediately reset it though.
can you change the first line of the commit message to just be |
Yep. I'll get the hang of these commit messages eventually... |
hmm looks like this does not handle the case when you have a compositeView you render it and show it... and then reset its collection. (the itemView onShow) never gets called again |
Hmm. Ok. I'll look into that. |
Yeah sorry. I didn't see the composite view overrides. Fixing now. |
ah nothing to be sorry about, really appreciate you jumping in and helping out on this one. |
Updated. Has any thought been put into placing a Marionette.CollectionView.prototype.getItemViewContainer : function () { return this.$el; } If we did, then the implementation of |
* Fixes marionettejs#865 * Trigger itemView.onShow in appendBuffer * Fix bug in collectionView.spec
nice! |
Trigger itemView.onShow in appendBuffer if collectionView is already shown