eschutho commented on a change in pull request #11702:
URL:
https://github.com/apache/incubator-superset/pull/11702#discussion_r530048798
##########
File path: superset-frontend/src/components/ListView/utils.ts
##########
@@ -79,8 +90,34 @@ function mergeCreateFilterValues(list: Filter[], updateObj:
any) {
// convert filters from UI objects to data objects
export function convertFilters(fts: InternalFilter[]): FilterValue[] {
return fts
- .filter(f => typeof f.value !== 'undefined')
- .map(({ value, operator, id }) => ({ value, operator, id }));
+ .filter(f => {
+ if (typeof f.value === 'undefined') return false;
+ if (Array.isArray(f.value) && !f.value.length) return false;
+ return true;
Review comment:
how about
```
.filter(f => !((typeof f.value === 'undefined') || (Array.isArray(f.value)
&& !f.value.length)))
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]