Skip to content

Commit

Permalink
fix infinite scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
gevhambardzumyan committed Feb 3, 2021
1 parent 951a01e commit 41de86e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/controllers/Lane.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ class Lane extends Component {
this.setState({loading: true})
const nextPage = currentPage + 1
onLaneScroll(nextPage, this.props.id).then(moreCards => {
if (!moreCards || moreCards.length === 0) {
// if no cards present, stop retrying until user action
node.scrollTop = node.scrollTop - 10
} else {
if ((moreCards || []).length > 0) {
this.props.actions.paginateLane({
laneId: this.props.id,
newCards: moreCards,
Expand Down

0 comments on commit 41de86e

Please sign in to comment.