diff --git a/lib/Canvas.js b/lib/Canvas.js index c7108ca..e834fd5 100644 --- a/lib/Canvas.js +++ b/lib/Canvas.js @@ -179,9 +179,9 @@ var Canvas = React.createClass({ setScrollLeft(scrollLeft) { if (this._currentRowsLength !== undefined) { - for (var i = 0, len = this._currentRowsLength; i < len; i++) { - this.refs[i].setScrollLeft(scrollLeft); - } + Object.keys(this.refs).forEach(function(key){ + this.refs[key].setScrollLeft(scrollLeft) + }, this); } }, diff --git a/package.json b/package.json index f4e6355..18a8f44 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "reactify": "^0.14.0" }, "peerDependencies": { - "react": "^0.11.1" + "react": ">=0.11.1" }, "devDependencies": { "browserify": "^5.9.1",