Skip to content
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

onBeforeAttach and onAttach for CollectionView child views #2527

Merged
merged 1 commit into from
Apr 28, 2015

Conversation

ianmstew
Copy link
Member

Fixes #2526. Cherry-pick of #2481 for 2.4.2.

@ianmstew
Copy link
Member Author

Pinging @ahumphreys87 and @jasonLaster -- you guys thumbs-upped the original PR against next. :)

@ianmstew
Copy link
Member Author

The main difference between this and the original PR is that, instead of calling Marionette.triggerMethodMany(), I'm calling this._triggerMethodMany(), which is actually Jason's code from next that I dropped into CollectionView for backward-compatibility.

The second difference is the once('render' approach to firing before:attach within _addChildView() that we agreed on strictly for 2.4.2 here: #2481 (comment).

Obviously, both of these workarounds do not exist in the original code already merged into next.

@jasonLaster
Copy link
Member

Is it safe to drop addEmptyView? Sorry Ian if yhis is more work.

@ahumphreys87
Copy link
Member

That's my only questions also, tricky as its one of those methods that probably should never have been "public" as it does so much that people shouldn't mess with but because it was it will be a breaking change :(

@ianmstew
Copy link
Member Author

Ahh, I overlooked that. No problem at all.

@ianmstew
Copy link
Member Author

There we go. I wanted to cry bumping maxstatements and maxcomplexity just because of addEmptyView()...

@ahumphreys87
Copy link
Member

yeah it's ok we can kill it in 3.0 :)

👍

jasonLaster added a commit that referenced this pull request Apr 28, 2015
onBeforeAttach and onAttach for CollectionView child views
@jasonLaster jasonLaster merged commit c0fbf4d into marionettejs:2.4.2 Apr 28, 2015
@jasonLaster
Copy link
Member

💥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants