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:
parent
a06125ae18
commit
0ccfaf03af
|
@ -433,6 +433,9 @@ export class QueryBuilder<T> {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
if (typeof value === "boolean") {
|
||||||
|
return `(*:* AND !${key}:${value})`
|
||||||
|
}
|
||||||
return `!${key}:${builder.preprocess(value, allPreProcessingOpts)}`
|
return `!${key}:${builder.preprocess(value, allPreProcessingOpts)}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
$: datasource = getDatasourceForProvider($currentAsset, componentInstance)
|
$: datasource = getDatasourceForProvider($currentAsset, componentInstance)
|
||||||
$: schema = getSchemaForDatasource($currentAsset, datasource)?.schema
|
$: schema = getSchemaForDatasource($currentAsset, datasource)?.schema
|
||||||
$: schemaFields = Object.values(schema || {})
|
$: schemaFields = Object.values(schema || {})
|
||||||
$: text = getText(value)
|
$: text = getText(value?.filter(filter => filter.field))
|
||||||
|
|
||||||
async function saveFilter() {
|
async function saveFilter() {
|
||||||
dispatch("change", tempValue)
|
dispatch("change", tempValue)
|
||||||
|
|
Loading…
Reference in New Issue