mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
[bugfix] cannot add options to FilterBox (#6231)
* [bugfix] cannot add options to FilterBox * addressing comments
This commit is contained in:
parent
2ad8e2ee2b
commit
af38d254f0
@ -178,8 +178,7 @@ class FilterBox extends React.Component {
|
|||||||
// Add created options to filtersChoices, even though it doesn't exist,
|
// Add created options to filtersChoices, even though it doesn't exist,
|
||||||
// or these options will exist in query sql but invisible to end user.
|
// or these options will exist in query sql but invisible to end user.
|
||||||
Object.keys(selectedValues)
|
Object.keys(selectedValues)
|
||||||
.filter(key => !selectedValues.hasOwnProperty(key)
|
.filter(key => selectedValues.hasOwnProperty(key) && (key in filtersChoices))
|
||||||
|| !(key in filtersChoices))
|
|
||||||
.forEach((key) => {
|
.forEach((key) => {
|
||||||
const choices = filtersChoices[key] || [];
|
const choices = filtersChoices[key] || [];
|
||||||
const choiceIds = new Set(choices.map(f => f.id));
|
const choiceIds = new Set(choices.map(f => f.id));
|
||||||
|
Loading…
Reference in New Issue
Block a user