mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
[filter_box] option to delay filtering with apply button (#2338)
* [filter_box] delayed filtering with apply button * Remove lingering console.log statement
This commit is contained in:
committed by
GitHub
parent
b4a96bd840
commit
af3415b040
@@ -101,10 +101,9 @@ class ChartContainer extends React.PureComponent {
|
||||
|
||||
height: getHeight,
|
||||
|
||||
setFilter: () => {
|
||||
// set filter according to data in store
|
||||
// used in FilterBox.onChange()
|
||||
},
|
||||
setFilter: () => {},
|
||||
|
||||
addFilter: () => {},
|
||||
|
||||
getFilters: () => (
|
||||
// return filter objects from viz.formData
|
||||
|
||||
@@ -840,6 +840,17 @@ export const controls = {
|
||||
description: 'Font size for the biggest value in the list',
|
||||
},
|
||||
|
||||
instant_filtering: {
|
||||
type: 'CheckboxControl',
|
||||
label: 'Instant Filtering',
|
||||
renderTrigger: true,
|
||||
default: true,
|
||||
description: (
|
||||
'Whether to apply filters as they change, or wait for' +
|
||||
'users to hit an [Apply] button'
|
||||
),
|
||||
},
|
||||
|
||||
show_brush: {
|
||||
type: 'CheckboxControl',
|
||||
label: 'Range Filter',
|
||||
|
||||
@@ -607,7 +607,7 @@ const visTypes = {
|
||||
{
|
||||
label: null,
|
||||
controlSetRows: [
|
||||
['date_filter'],
|
||||
['date_filter', 'instant_filtering'],
|
||||
['groupby'],
|
||||
['metric'],
|
||||
],
|
||||
|
||||
@@ -244,11 +244,11 @@ const px = function () {
|
||||
resize() {
|
||||
this.render();
|
||||
},
|
||||
addFilter(col, vals) {
|
||||
controller.addFilter(sliceId, col, vals);
|
||||
addFilter(col, vals, merge = true, refresh = true) {
|
||||
controller.addFilter(sliceId, col, vals, merge, refresh);
|
||||
},
|
||||
setFilter(col, vals) {
|
||||
controller.setFilter(sliceId, col, vals);
|
||||
setFilter(col, vals, refresh = true) {
|
||||
controller.setFilter(sliceId, col, vals, refresh);
|
||||
},
|
||||
getFilters() {
|
||||
return controller.filters[sliceId];
|
||||
|
||||
Reference in New Issue
Block a user