Closed samhashemi closed 9 years ago
Note that one of the tests was modifying the ItemView prototype, and screwing up subsequent tests. I cleaned that up as well.
+1 haven't checked out the code, but took a read and this looks good to me, and CI builds pass. Thanks @samhashemi!
+1
Exactly what I need. Would currently save me some lines of code. Thanks @samhashemi! Please add this enhancement soon guys!
Any chance we can get this merged? cc @latentflip
@samhashemi sure, though, just realised we'll need to get it documented too. Maybe over in https://github.com/AmpersandJS/ampersand-view#rendercollection-viewrendercollectioncollection-itemview-containerel-viewoptions somewhere. Think you can do that too?
This pull requests adds the ability to include an
emptyView
option, which is used when 0 views are rendered. It is automatically removed when the first collection item is added, and shown again when the collection goes back to zero.The use case is showing a special view for empty lists, usually with instructions/graphics.