Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent the duplicate last entry when sorting by _createdAt #1334

Merged
merged 3 commits into from
Oct 17, 2019

Conversation

W0lfw00d
Copy link
Contributor

@W0lfw00d W0lfw00d commented Oct 7, 2019

Only do a complex query for createdAt instead of -createdAt

This should resolve this issue: #1309

@dplewis
Copy link
Member

dplewis commented Oct 9, 2019

@W0lfw00d It looks good to me. Can you provide details on how to replicate the issue?

@W0lfw00d
Copy link
Contributor Author

W0lfw00d commented Oct 10, 2019

Basically have more row than can during the initial load (40 for example) and check the length of this.state.data. When you sort by "createdAt" in ascending order and scroll down in the list, it will return 41 items instead of 40.

(and the bottom two rows will be identical)

@acinader acinader mentioned this pull request Oct 17, 2019
Copy link
Member

@dplewis dplewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2019-10-17 at 11 54 44 AM

Good catch! I had multiple duplicates and this fixes it.

@acinader acinader merged commit 359aadf into parse-community:master Oct 17, 2019
@W0lfw00d W0lfw00d deleted the bugfix/issue-1309 branch October 17, 2019 21:36
beiguancyc pushed a commit to beiguancyc/parse-dashboard that referenced this pull request Oct 18, 2019
* parse: (36 commits)
  prepare for 2.0.4 (parse-community#1347)
  Only do a complex query for createdAt instead of -createdAt (parse-community#1334)
  Update parse to the latest version 🚀 (parse-community#1345)
  Update webpack to the latest version 🚀 (parse-community#1344)
  Update core-js to the latest version 🚀 (parse-community#1343)
  Update core-js to the latest version 🚀 (parse-community#1342)
  Update core-js to the latest version 🚀 (parse-community#1341)
  Update eslint-plugin-jest to the latest version 🚀 (parse-community#1340)
  Update eslint-plugin-jest to the latest version 🚀 (parse-community#1339)
  Update webpack to the latest version 🚀 (parse-community#1338)
  Update babel7 to the latest version 🚀 (parse-community#1337)
  Fixed incorrect links to PR details (parse-community#1329)
  Update babel7 to the latest version 🚀 (parse-community#1335)
  Update eslint-plugin-react to the latest version 🚀 (parse-community#1327)
  Update react to the latest version 🚀 (parse-community#1326)
  Update cross-env to the latest version 🚀 (parse-community#1324)
  This should resolve parse-community#1297. The objectId was missing from the filter list. (parse-community#1315)
  Update eslint-plugin-react to the latest version 🚀 (parse-community#1322)
  Update cross-env to the latest version 🚀 (parse-community#1321)
  Update eslint-plugin-react to the latest version 🚀 (parse-community#1319)
  ...

# Conflicts:
#	package-lock.json
douglasmuraoka added a commit to douglasmuraoka/parse-dashboard that referenced this pull request Dec 24, 2019
After parse-community#1334, the infinite scroll is no longer loading the next set of objects. This commit undoes parse-community#1334, and tries another approach in order to fix the original problem.
acinader pushed a commit that referenced this pull request Dec 24, 2019
After #1334, the infinite scroll is no longer loading the next set of objects. This commit undoes #1334, and tries another approach in order to fix the original problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants