react-variable-height-infinite-scroller
Advanced tools
Comparing version
28
index.js
var React = require('react'); | ||
var areNonNegativeIntegers = require('validate.io-nonnegative-integer-array'); | ||
var InfiniteScoller = React.createClass({ | ||
var InfiniteScoller = React.createClass({displayName: "InfiniteScoller", | ||
propTypes: { | ||
@@ -227,14 +227,14 @@ averageElementHeight: React.PropTypes.number.isRequired, | ||
return ( | ||
<div | ||
ref="infiniteContainer" | ||
className="infiniteContainer" | ||
style={infiniteContainerStyle} | ||
onScroll={this.onEditorScroll} | ||
> | ||
<div ref="topSpacer" className="topSpacer" style={{height: this.topSpacerHeight}}/> | ||
<div ref="visibleRowsContainer" className="visibleRowsContainer"> | ||
{rowItems} | ||
</div> | ||
<div ref="bottomSpacer" className="bottomSpacer" style={{height: this.bottomSpacerHeight}}/> | ||
</div> | ||
React.createElement("div", { | ||
ref: "infiniteContainer", | ||
className: "infiniteContainer", | ||
style: infiniteContainerStyle, | ||
onScroll: this.onEditorScroll | ||
}, | ||
React.createElement("div", {ref: "topSpacer", className: "topSpacer", style: {height: this.topSpacerHeight}}), | ||
React.createElement("div", {ref: "visibleRowsContainer", className: "visibleRowsContainer"}, | ||
rowItems | ||
), | ||
React.createElement("div", {ref: "bottomSpacer", className: "bottomSpacer", style: {height: this.bottomSpacerHeight}}) | ||
) | ||
); | ||
@@ -244,2 +244,2 @@ } | ||
module.exports = InfiniteScoller; | ||
module.exports = InfiniteScoller; |
{ | ||
"name": "react-variable-height-infinite-scroller", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "variable row height scroller that renders just the visible rows with no precomputation of row-height necessary", | ||
@@ -8,3 +8,5 @@ "main": "index.js", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "browserify -t reactify ./examples/example.js > ./examples/example.out.js" | ||
"runExample": "browserify -t reactify ./examples/example.js > ./examples/example.out.js", | ||
"build": "jsx InfiniteScroller.js > index.js", | ||
"prepublish": "npm run build" | ||
}, | ||
@@ -34,3 +36,6 @@ "repository": { | ||
"validate.io-nonnegative-integer-array": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"react-tools": "^0.13.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
668302
1.79%8
14.29%18537
1.22%1
Infinity%