Permalink
Browse files

Make sure that the values are valid before changing rowHeight estimate

  • Loading branch information...
1 parent 463545e commit d06b58e6fc5c78ec66836d270e0b271ba376f75c @kriszyp committed Feb 18, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 OnDemandList.js
  2. +1 −1 test/dijit_layout_programmatic.html
View
4 OnDemandList.js
@@ -89,8 +89,8 @@ return declare([List, _StoreMixin], {
for(var i = 0; i < trCount; i++){
height += trs[i].offsetHeight;
}
- // only update rowHeight if we actually got results
- if(trCount){ self.rowHeight = height / trCount; }
+ // only update rowHeight if we actually got results and are visible
+ if(trCount && height){ self.rowHeight = height / trCount; }
total -= trCount;
preload.count = total;
View
2 test/dijit_layout_programmatic.html
@@ -89,7 +89,7 @@
// TabContainer
var tc = new TC({
id: "tab",
- class: "bcCenter",
+ "class": "bcCenter",
region: "center"
});

0 comments on commit d06b58e

Please sign in to comment.