-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix double requests on default sort #1583
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1583 +/- ##
===========================================
+ Coverage 96.19% 96.23% +0.03%
===========================================
Files 161 161
Lines 6863 6935 +72
Branches 2135 2147 +12
===========================================
+ Hits 6602 6674 +72
Misses 240 240
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - tried it out and it only sends the default sort-ed request, fixes the issue in an efficient way, and it's tested in the unit tests. @kevinphippsstfc for reference, this is the bug you raised and it's now got a fix if we need to hotfix this before the next DG release then let me know.
Fixed double requests bug on default sort
Any table/card view that uses default sorting now checks whether it has been mounted to prevent data requests being sent twice.
The
isMounted
variable is used to disable or enable queries in datagateway-common/api.Testing instructions
Updated unit tests to check for double requests when default sort is specified.
Agile board tracking
connect to #1582