nytai commented on a change in pull request #11675:
URL:
https://github.com/apache/incubator-superset/pull/11675#discussion_r525902427
##########
File path: superset-frontend/src/components/ListView/utils.ts
##########
@@ -63,11 +68,11 @@ function updateInList(list: any[], index: number, update:
any): any[] {
];
}
-function mergeCreateFilterValues(list: Filter[], updateList: FilterValue[]) {
+function mergeCreateFilterValues(list: Filter[], updateObj: any) {
return list.map(({ id, operator }) => {
- const update = updateList.find(obj => obj.id === id);
+ const update = updateObj[id] || [];
- return { id, operator, value: update?.value };
+ return { id, operator, value: update[0] };
Review comment:
so it looks like we're only using the value portion of the query filter
state. We could take it further and only serialize the value and not the
operator
----------------------------------------------------------------
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]