Skip to content

Commit

Permalink
(rm) semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
Radivarig committed Nov 26, 2016
1 parent 8cde432 commit 0eb16fc
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/InfiniteAnyHeight.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import ReactInfinite from 'react-infinite';
import React from 'react'
import ReactInfinite from 'react-infinite'

class GetHeightWrapper extends React.Component {
constructor(props) {
super(props);
super(props)

this.state = {
height: undefined
Expand All @@ -15,9 +15,9 @@ class GetHeightWrapper extends React.Component {
}

setHeight() {
var height = this.node.getBoundingClientRect().height;
this.props.addHeight(height);
this.setState({height});
var height = this.node.getBoundingClientRect().height
this.props.addHeight(height)
this.setState({height})
}

render() {
Expand All @@ -42,15 +42,15 @@ GetHeightWrapper.propTypes = {

class InfiniteAnyHeight extends React.Component {
constructor(props) {
super(props);
super(props)

this.state = {
heights: [],
list: [],
};

this.lastScrollTop = 0;
this.scrollTopDelta = 0;
this.lastScrollTop = 0
this.scrollTopDelta = 0
}

getScrollContainer() {
Expand Down Expand Up @@ -79,19 +79,19 @@ class InfiniteAnyHeight extends React.Component {
}

setList(propsList) {
var heights = [];
var heights = []

var list = propsList.map((x, i) => {
heights[i] = this.state.heights[i] || this.props.heights[i] || 200;
heights[i] = this.state.heights[i] || this.props.heights[i] || 200

return (
<GetHeightWrapper
addHeight={this.addHeight.bind(this, i)}
key={i}>
{x}
</GetHeightWrapper>
);
});
)
})

this.setState({
heights,
Expand Down Expand Up @@ -121,7 +121,7 @@ class InfiniteAnyHeight extends React.Component {
InfiniteAnyHeight.defaultProps = {
heightsUpdateCallback: ()=>{},
heights: []
};
}

InfiniteAnyHeight.propTypes = {
heights: React.PropTypes.array,
Expand All @@ -131,4 +131,4 @@ InfiniteAnyHeight.propTypes = {
useWindowAsScrollContainer: React.PropTypes.bool
}

export default InfiniteAnyHeight;
export default InfiniteAnyHeight

0 comments on commit 0eb16fc

Please sign in to comment.