superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: [explore] don't prompt to 'Run Query' on viewport change (#4729)
Date Mon, 02 Apr 2018 20:35:54 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 11c9e67  [explore] don't prompt to 'Run Query' on viewport change (#4729)
11c9e67 is described below

commit 11c9e67ebb957d1782c26ebb242a951537266cfb
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Mon Apr 2 13:35:51 2018 -0700

    [explore] don't prompt to 'Run Query' on viewport change (#4729)
---
 .../assets/javascripts/explore/components/ExploreViewContainer.jsx    | 4 +++-
 superset/assets/javascripts/explore/stores/controls.jsx               | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/superset/assets/javascripts/explore/components/ExploreViewContainer.jsx b/superset/assets/javascripts/explore/components/ExploreViewContainer.jsx
index a254ded..1fec139 100644
--- a/superset/assets/javascripts/explore/components/ExploreViewContainer.jsx
+++ b/superset/assets/javascripts/explore/components/ExploreViewContainer.jsx
@@ -145,7 +145,9 @@ class ExploreViewContainer extends React.Component {
   }
 
   hasQueryControlChanged(changedControlKeys, currentControls) {
-    return changedControlKeys.some(key => !currentControls[key].renderTrigger);
+    return changedControlKeys.some(key => (
+      !currentControls[key].renderTrigger && !currentControls[key].dontRefreshOnChange
+    ));
   }
 
   triggerQueryIfNeeded() {
diff --git a/superset/assets/javascripts/explore/stores/controls.jsx b/superset/assets/javascripts/explore/stores/controls.jsx
index 3b23fb2..e4a37a2 100644
--- a/superset/assets/javascripts/explore/stores/controls.jsx
+++ b/superset/assets/javascripts/explore/stores/controls.jsx
@@ -1615,6 +1615,8 @@ export const controls = {
     description: t('Parameters related to the view and perspective on the map'),
     // default is whole world mostly centered
     default: defaultViewport,
+    // Viewport changes shouldn't prompt user to re-run query
+    dontRefreshOnChange: true,
   },
 
   viewport_zoom: {

-- 
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.

Mime
View raw message