mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Fixing filtering issues (#2223)
* Fixing filtering issues * Fixing off by one error
This commit is contained in:
committed by
GitHub
parent
aff524d843
commit
459f7160ac
@@ -56,7 +56,7 @@ export function getControlsState(state, form_data) {
|
||||
// Removing invalid filters that point to a now inexisting column
|
||||
if (control.type === 'FilterControl' && control.choices) {
|
||||
const choiceValues = control.choices.map(c => c[0]);
|
||||
formData[k] = control.value.filter(flt => choiceValues.indexOf(flt.col) > 0);
|
||||
formData[k] = formData[k].filter(flt => choiceValues.indexOf(flt.col) >= 0);
|
||||
}
|
||||
|
||||
if (typeof control.default === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user