fix cohort queries with new multiselect

This commit is contained in:
Francis Cao committed 2026-02-20 15:03:24 -08:00
1 parent f2cf071523
commit bbf569e8bc
3 files changed
+10 -4

No files matched your search

+4 -1
View File
@@ -178,7 +178,10 @@ function getQueryParams(filters: Record<string, any>) {
return {
...filters,
...filtersObjectToArray(filters).reduce((obj, { name, column, operator, value }) => {
if (!column || !name || value === undefined) return obj;
const resolvedColumn =
column || (name?.startsWith('cohort_') && FILTER_COLUMNS[name.slice('cohort_'.length)]);
if (!resolvedColumn || !name || value === undefined) return obj;
obj[name] = ([OPERATORS.equals, OPERATORS.notEquals] as string[]).includes(operator)
? Array.isArray(value)