Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Commit

Permalink
Remove dependency on React.addons. Bump to 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
garetht committed Feb 2, 2015
1 parent d2d938a commit b1803f7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gulp.task('buildp', function() {
});

gulp.task('example', function() {
gulp.src(["bower_components/react/react-with-addons.js", "src/react-infinite.jsx", "examples/index.jsx"])
gulp.src(["bower_components/react/react.js", "src/react-infinite.jsx", "examples/index.jsx"])
.pipe(jsx())
.pipe(concat("bundle_scripts.js"))
.pipe(gulp.dest('examples'))
Expand Down
6 changes: 1 addition & 5 deletions dist/react-infinite.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/react-infinite.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-infinite",
"version": "0.2.1",
"version": "0.2.2",
"description": "A browser-ready efficient scrolling container based on UITableView",
"main": "dist/react-infinite.js",
"repository": {
Expand Down
6 changes: 1 addition & 5 deletions src/react-infinite.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
root.Infinite = factory(root.React);
}
}(this, function (React) {
var cx = React.addons.classSet;
var Infinite = React.createClass({

propTypes: {
Expand Down Expand Up @@ -233,17 +232,14 @@
var displayables = this.props.children.slice(this.state.displayIndexStart,
this.state.displayIndexEnd);

var infiniteClassSet = {};
infiniteClassSet[this.props.classNames] = !!this.props.classNames;

var infiniteScrollStyles = {};
if (this.state.isScrolling) {
infiniteScrollStyles.pointerEvents = 'none';
}

// topSpacer and bottomSpacer take up the amount of space that the
// rendered elements would have taken up otherwise
return <div className={cx(infiniteClassSet)}
return <div className={this.props.className ? this.props.className : ''}
ref="scrollable"
style={this.buildScrollableStyle()}
onScroll={this.infiniteHandleScroll}>
Expand Down

0 comments on commit b1803f7

Please sign in to comment.