use normal combobox for filtering array columns

This commit is contained in:
Peter Clement 2021-08-25 17:00:42 +01:00
parent 5b23ea1dc9
commit 3ce5b96b0c
2 changed files with 3 additions and 17 deletions

View File

@ -136,7 +136,7 @@
/>
{:else if ["string", "longform", "number"].includes(filter.type)}
<Input disabled={filter.noValue} bind:value={filter.value} />
{:else if filter.type === "options"}
{:else if filter.type === "options" || filter.type === "array"}
<Combobox
disabled={filter.noValue}
options={getFieldOptions(filter.field)}

View File

@ -229,14 +229,7 @@ class QueryBuilder {
if (!value) {
return null
}
let opts = []
value.forEach(val =>
opts.push(
`${key}.${val}:${builder.preprocess(val, allPreProcessingOpts)}`
)
)
const joined = opts.join(" AND ")
return joined
return `${key}.${value}:${builder.preprocess(value, allPreProcessingOpts)}`
})
}
@ -245,14 +238,7 @@ class QueryBuilder {
if (!value) {
return null
}
let opts = []
value.forEach(val =>
opts.push(
`!${key}.${val}:${builder.preprocess(val, allPreProcessingOpts)}`
)
)
const joined = opts.join(" AND ")
return joined
return `!${key}.${value}:${builder.preprocess(value, allPreProcessingOpts)}`
})
}