mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix advanced filter
This commit is contained in:
@@ -245,6 +245,14 @@ function applyFilter(dbQuery: QueryBuilder, filter: Filter) {
|
||||
dbQuery.whereNot({ [key]: compareValue });
|
||||
}
|
||||
|
||||
if (operator === '_contains') {
|
||||
dbQuery.where(key, 'like', `%${compareValue}%`);
|
||||
}
|
||||
|
||||
if (operator === '_ncontains') {
|
||||
dbQuery.where(key, 'like', `%${compareValue}%`);
|
||||
}
|
||||
|
||||
if (operator === '_in') {
|
||||
let value = compareValue;
|
||||
if (typeof value === 'string') value = value.split(',');
|
||||
|
||||
Reference in New Issue
Block a user