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
[SQL Lab] Implement refetch results button properly #9220
[SQL Lab] Implement refetch results button properly #9220
Conversation
bsSize="sm" | ||
className="fetch" | ||
bsStyle="primary" | ||
onClick={this.reFetchQueryResults.bind(this, { |
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.
https://www.freecodecamp.org/news/the-best-way-to-bind-event-handlers-in-react-282db2cf1530/
In Superset code base, usually we bind in constructor.
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.
got it. It was bound like this before, but I'll move the binding in both places to the constructor
326658f
to
cf88080
Compare
@graceguo-supercat I updated all the instances of bind in the file to happen in the constructor (and removed the |
Codecov Report
@@ Coverage Diff @@
## master #9220 +/- ##
==========================================
- Coverage 58.92% 58.92% -0.01%
==========================================
Files 372 372
Lines 11999 12008 +9
Branches 2940 2942 +2
==========================================
+ Hits 7071 7076 +5
- Misses 4750 4754 +4
Partials 178 178
Continue to review full report at Codecov.
|
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!
CATEGORY
Choose one
SUMMARY
Previously, we were rendering the Fetch data preview button when you switched away from a running query tab and switched back after the query finished. Clicking on this button would just rerun the query again. Now we check to see if a results key is set, and if so we fetch the results from the results cache
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
Run a query in a tab, switch to another tab, come back and click the fetch results button, see no new query run.
Ensure refetching data previews still works.
Ensure running normal queries still work
ADDITIONAL INFORMATION
REVIEWERS
to: @graceguo-supercat @betodealmeida @rusackas