Skip to content

Instantly share code, notes, and snippets.

@tim-evans
Created October 27, 2011 18:12
Show Gist options
  • Select an option

  • Save tim-evans/1320341 to your computer and use it in GitHub Desktop.

Select an option

Save tim-evans/1320341 to your computer and use it in GitHub Desktop.
SC.CollectionView doesn't update layout when length changes
diff --git a/frameworks/desktop/views/collection.js b/frameworks/desktop/views/collection.js
index 4a1bd23..d8aff63 100644
--- a/frameworks/desktop/views/collection.js
+++ b/frameworks/desktop/views/collection.js
@@ -759,6 +759,7 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate, SC.CollectionConte
contentLengthDidChange: function() {
var content = this.get('content');
this.set('length', content ? content.get('length') : 0);
+ this.computeLayout();
},
/** @private
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment