Skip to content

Commit ebc2f50

Browse files
[fix] Fixes terribad bug with order of getItems arguments and _getViewBox call
1 parent eaff496 commit ebc2f50

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

dist/VirtualList.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ var VirtualList = React.createClass({displayName: "VirtualList",
6666

6767
return !equal;
6868
},
69-
viewBox: function viweBox(nextProps) {
70-
return (this.view = this.view || this._getViewBox);
69+
viewBox: function viewBox(nextProps) {
70+
return (this.view = this.view || this._getViewBox(nextProps));
7171
},
7272
_getViewBox: function _getViewBox(nextProps) {
7373
return {
@@ -146,7 +146,7 @@ VirtualList.getBox = function getBox(view, list) {
146146
};
147147
};
148148

149-
VirtualList.getItems = function(viewBox, listBox, itemBuffer, itemHeight, itemCount) {
149+
VirtualList.getItems = function(viewBox, listBox, itemHeight, itemCount, itemBuffer) {
150150
if (itemCount === 0 || itemHeight === 0) return {
151151
itemsInView: 0
152152
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-virtual-list",
3-
"version": "1.7.2",
3+
"version": "1.7.3",
44
"description": "Super simple virtualized list React component",
55
"main": "dist/VirtualList.js",
66
"directories": {

src/VirtualList.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ var VirtualList = React.createClass({
6666

6767
return !equal;
6868
},
69-
viewBox: function viweBox(nextProps) {
70-
return (this.view = this.view || this._getViewBox);
69+
viewBox: function viewBox(nextProps) {
70+
return (this.view = this.view || this._getViewBox(nextProps));
7171
},
7272
_getViewBox: function _getViewBox(nextProps) {
7373
return {
@@ -146,7 +146,7 @@ VirtualList.getBox = function getBox(view, list) {
146146
};
147147
};
148148

149-
VirtualList.getItems = function(viewBox, listBox, itemBuffer, itemHeight, itemCount) {
149+
VirtualList.getItems = function(viewBox, listBox, itemHeight, itemCount, itemBuffer) {
150150
if (itemCount === 0 || itemHeight === 0) return {
151151
itemsInView: 0
152152
};

0 commit comments

Comments
 (0)