fix cohort queries with new multiselect
This commit is contained in:
1 parent
f2cf071523
commit
bbf569e8bc
3 files changed
+10
-4
No files matched your search
+4
-1
@@ -182,7 +182,10 @@ function getQueryParams(filters: Record<string, any>) {
|
||||
return {
|
||||
...filters,
|
||||
...filtersObjectToArray(filters).reduce((obj, { name, column, operator, value }) => {
|
||||
if (!column) return obj;
|
||||
const resolvedColumn =
|
||||
column || (name?.startsWith('cohort_') && FILTER_COLUMNS[name.slice('cohort_'.length)]);
|
||||
|
||||
if (!resolvedColumn) return obj;
|
||||
|
||||
if (([OPERATORS.contains, OPERATORS.doesNotContain] as Operator[]).includes(operator)) {
|
||||
obj[name] = `%${value}%`;
|
||||
|
||||
Reference in new issue
Block a user