-
-
I think this would be a bit clearer and more consistent with other code by grouping like: var .. this.foo = this.bar = collection.each collection.on
-
With the version of backbone we're using, this could be: collection.on({ add: this._add, remove: this._remove }, this); Saves a few bytes.
-
-
I assume this must be defined by subclasses as part of the object definition? If so, can you add: itemViewType: null To the top of CollectionView's definition.
-
I recently updated the other like this to specifically say something like "... defined in the <classname> subclass's definition." I think that will help diagnose assertions.
-
-
-
Add a generic CollectionView for handling live-updating collections.
Review Request #4269 — Created June 28, 2013 and submitted
Add a generic CollectionView for handling live-updating collections. This adds a utility view for rendering collections of things. To use this, one extends this view with a new one that defines the itemViewType attribute. Items can be added to the collection before or after the view is rendered, and the results in the DOM will always match the current state of the collection.
Ran js-tests, used this in my post-commit view.
Description | From | Last Updated |
---|---|---|
I think this would be a bit clearer and more consistent with other code by grouping like: var .. this.foo … |
chipx86 | |
With the version of backbone we're using, this could be: collection.on({ add: this._add, remove: this._remove }, this); Saves a few … |
chipx86 | |
Can you add docs for all the functions? |
chipx86 | |
I assume this must be defined by subclasses as part of the object definition? If so, can you add: itemViewType: … |
chipx86 | |
I recently updated the other like this to specifically say something like "... defined in the subclass's definition." I think … |
chipx86 | |
Trailing comma. |
chipx86 | |
One per line. |
chipx86 | |
No trailing comma. |
chipx86 |