Skip to content

Commit

Permalink
[fix] Fixes terribad bug with order of getItems arguments and _getVie…
Browse files Browse the repository at this point in the history
…wBox call
  • Loading branch information
developerdizzle committed Nov 18, 2015
1 parent eaff496 commit ebc2f50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/VirtualList.js
Expand Up @@ -66,8 +66,8 @@ var VirtualList = React.createClass({displayName: "VirtualList",

return !equal;
},
viewBox: function viweBox(nextProps) {
return (this.view = this.view || this._getViewBox);
viewBox: function viewBox(nextProps) {
return (this.view = this.view || this._getViewBox(nextProps));
},
_getViewBox: function _getViewBox(nextProps) {
return {
Expand Down Expand Up @@ -146,7 +146,7 @@ VirtualList.getBox = function getBox(view, list) {
};
};

VirtualList.getItems = function(viewBox, listBox, itemBuffer, itemHeight, itemCount) {
VirtualList.getItems = function(viewBox, listBox, itemHeight, itemCount, itemBuffer) {
if (itemCount === 0 || itemHeight === 0) return {
itemsInView: 0
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-virtual-list",
"version": "1.7.2",
"version": "1.7.3",
"description": "Super simple virtualized list React component",
"main": "dist/VirtualList.js",
"directories": {
Expand Down
6 changes: 3 additions & 3 deletions src/VirtualList.jsx
Expand Up @@ -66,8 +66,8 @@ var VirtualList = React.createClass({

return !equal;
},
viewBox: function viweBox(nextProps) {
return (this.view = this.view || this._getViewBox);
viewBox: function viewBox(nextProps) {
return (this.view = this.view || this._getViewBox(nextProps));
},
_getViewBox: function _getViewBox(nextProps) {
return {
Expand Down Expand Up @@ -146,7 +146,7 @@ VirtualList.getBox = function getBox(view, list) {
};
};

VirtualList.getItems = function(viewBox, listBox, itemBuffer, itemHeight, itemCount) {
VirtualList.getItems = function(viewBox, listBox, itemHeight, itemCount, itemBuffer) {
if (itemCount === 0 || itemHeight === 0) return {
itemsInView: 0
};
Expand Down

0 comments on commit ebc2f50

Please sign in to comment.