Fixing problems when switching between match any and match all (#11179)

* Make sure displayed filter count is correct

* Fix for false boolean filter
This commit is contained in:
melohagan 2023-07-11 10:06:19 +01:00 committed by GitHub
parent a06125ae18
commit 0ccfaf03af
2 changed files with 4 additions and 1 deletions

View File

@ -433,6 +433,9 @@ export class QueryBuilder<T> {
if (!value) {
return null
}
if (typeof value === "boolean") {
return `(*:* AND !${key}:${value})`
}
return `!${key}:${builder.preprocess(value, allPreProcessingOpts)}`
})
}

View File

@ -20,7 +20,7 @@
$: datasource = getDatasourceForProvider($currentAsset, componentInstance)
$: schema = getSchemaForDatasource($currentAsset, datasource)?.schema
$: schemaFields = Object.values(schema || {})
$: text = getText(value)
$: text = getText(value?.filter(filter => filter.field))
async function saveFilter() {
dispatch("change", tempValue)