Skip to content
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

[explore] don't prompt to 'Run Query' on viewport change #4729

Merged
merged 1 commit into from
Apr 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,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