From 5324e253287ace43c7b2d6111a75131a30b33895 Mon Sep 17 00:00:00 2001 From: Grace Guo Date: Sun, 31 May 2020 22:12:04 -0700 Subject: [PATCH] [filter_box] disable instant_filtering by defult (#9952) --- .../cypress-base/cypress/integration/dashboard/filter.js | 3 +++ superset-frontend/src/explore/controlPanels/FilterBox.jsx | 8 ++++---- .../src/visualizations/FilterBox/FilterBox.jsx | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/filter.js b/superset-frontend/cypress-base/cypress/integration/dashboard/filter.js index 0f4fea794e..11edd8694e 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/filter.js +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/filter.js @@ -85,6 +85,9 @@ export default () => .focus({ force: true }) .type('uth Asia{enter}', { force: true }); + // by default, need to click Apply button to apply filter + cy.get('.filter_box button').click({ force: true }); + // wait again after applied filters cy.wait(aliases.filter(x => x !== getAlias(filterId))).then(requests => { requests.forEach(xhr => { diff --git a/superset-frontend/src/explore/controlPanels/FilterBox.jsx b/superset-frontend/src/explore/controlPanels/FilterBox.jsx index 7d8a701b35..f0e14dbb6c 100644 --- a/superset-frontend/src/explore/controlPanels/FilterBox.jsx +++ b/superset-frontend/src/explore/controlPanels/FilterBox.jsx @@ -55,10 +55,10 @@ export default { type: 'CheckboxControl', label: t('Instant Filtering'), renderTrigger: true, - default: true, - description: - 'Whether to apply filters as they change, or wait for ' + - 'users to hit an [Apply] button', + default: false, + description: t( + 'Check to apply filters instantly as they change instead of displaying [Apply] button', + ), }, }, ], diff --git a/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx b/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx index df04752888..0b6d784a58 100644 --- a/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx +++ b/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx @@ -89,7 +89,7 @@ const defaultProps = { showSqlaTimeColumn: false, showDruidTimeGrain: false, showDruidTimeOrigin: false, - instantFiltering: true, + instantFiltering: false, }; class FilterBox extends React.Component {