Add the onEmptyFilter flag to table conditions to ensure we don't match empty values

This commit is contained in:
Andrew Kingston 2024-07-19 16:34:46 +01:00
parent 2ecedcea7c
commit 0e9a89b49b
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import { writable, get } from "svelte/store"
import { derivedMemo, QueryUtils } from "../../../utils"
import { FieldType } from "@budibase/types"
import { FieldType, EmptyFilterOption } from "@budibase/types"
export const createStores = () => {
const metadata = writable({})
@ -123,7 +123,8 @@ const evaluateConditions = (row, conditions) => {
field: "value",
value: referenceValue,
}
const query = QueryUtils.buildQuery([luceneFilter])
let query = QueryUtils.buildQuery([luceneFilter])
query.onEmptyFilter = EmptyFilterOption.RETURN_NONE
const result = QueryUtils.runQuery([{ value }], query)
if (result.length > 0) {
if (target === "row") {