Skip to content

Commit

Permalink
Avoid creating context bindings for collection views
Browse files Browse the repository at this point in the history
  • Loading branch information
mmun committed Feb 4, 2015
1 parent 038f640 commit a257607
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions packages/ember-htmlbars/lib/helpers/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { map } from 'ember-metal/enumerable_utils';
import {
streamifyClassNameBinding
} from "ember-views/streams/class_name_binding";
import { Binding } from 'ember-metal/binding';
import mergeViewBindings from "ember-htmlbars/system/merge-view-bindings";

/**
Expand Down Expand Up @@ -229,12 +228,6 @@ export function collectionHelper(params, hash, options, env) {
}
if (emptyViewClass) { hash.emptyView = emptyViewClass; }

if (hash.keyword) {
itemHash._contextBinding = Binding.oneWay('_parentView.context');
} else {
itemHash._contextBinding = Binding.oneWay('content');
}

var viewOptions = mergeViewBindings(this, {}, itemHash);

if (hash.itemClassBinding) {
Expand Down
2 changes: 1 addition & 1 deletion packages/ember-views/lib/views/collection_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ var CollectionView = ContainerView.extend({

for (idx = start; idx < start+added; idx++) {
item = content.objectAt(idx);

itemViewProps._context = this.keyword ? this.get('context') : item;
itemViewProps.content = item;
itemViewProps.contentIndex = idx;

Expand Down

0 comments on commit a257607

Please sign in to comment.