Skip to content

Commit

Permalink
[explore] don't prompt to 'Run Query' on viewport change (apache#4729)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 2, 2018
1 parent 77ef5fd commit fbbba5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -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() {
Expand Down
2 changes: 2 additions & 0 deletions superset/assets/javascripts/explore/stores/controls.jsx
Expand Up @@ -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: {
Expand Down

0 comments on commit fbbba5e

Please sign in to comment.