You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/03/02 21:13:39 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #9220: [SQL Lab] Implement refetch results button properly

etr2460 commented on a change in pull request #9220: [SQL Lab] Implement refetch results button properly
URL: https://github.com/apache/incubator-superset/pull/9220#discussion_r386653408
 
 

 ##########
 File path: superset-frontend/src/SqlLab/components/ResultSet.jsx
 ##########
 @@ -258,19 +258,32 @@ export default class ResultSet extends React.PureComponent {
       }
     }
     if (query.cached || (query.state === 'success' && !query.results)) {
-      return (
-        <Button
-          bsSize="sm"
-          className="fetch"
-          bsStyle="primary"
-          onClick={this.reFetchQueryResults.bind(this, {
-            ...query,
-            isDataPreview: true,
-          })}
-        >
-          {t('Fetch data preview')}
-        </Button>
-      );
+      if (query.isDataPreview) {
+        return (
+          <Button
+            bsSize="sm"
+            className="fetch"
+            bsStyle="primary"
+            onClick={this.reFetchQueryResults.bind(this, {
 
 Review comment:
   got it. It was bound like this before, but I'll move the binding in both places to the constructor

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org