Skip to content

Commit

Permalink
Merge pull request #449 from coluccini/collection-scrolltopcell-scrol…
Browse files Browse the repository at this point in the history
…ling-bug

scrollToAlignment should be pull from props and not from state
  • Loading branch information
bvaughn authored Nov 1, 2016
2 parents df1a05e + 0ea83fc commit 9a470bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/Collection/CollectionView.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ export default class CollectionView extends Component {
}

componentDidUpdate (prevProps, prevState) {
const { height, scrollToCell, width } = this.props
const { scrollLeft, scrollPositionChangeReason, scrollToAlignment, scrollTop } = this.state
const { height, scrollToAlignment, scrollToCell, width } = this.props
const { scrollLeft, scrollPositionChangeReason, scrollTop } = this.state

// Make sure requested changes to :scrollLeft or :scrollTop get applied.
// Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,
Expand Down

0 comments on commit 9a470bd

Please sign in to comment.