use normal combobox for filtering array columns
This commit is contained in:
parent
5b23ea1dc9
commit
3ce5b96b0c
|
@ -136,7 +136,7 @@
|
||||||
/>
|
/>
|
||||||
{:else if ["string", "longform", "number"].includes(filter.type)}
|
{:else if ["string", "longform", "number"].includes(filter.type)}
|
||||||
<Input disabled={filter.noValue} bind:value={filter.value} />
|
<Input disabled={filter.noValue} bind:value={filter.value} />
|
||||||
{:else if filter.type === "options"}
|
{:else if filter.type === "options" || filter.type === "array"}
|
||||||
<Combobox
|
<Combobox
|
||||||
disabled={filter.noValue}
|
disabled={filter.noValue}
|
||||||
options={getFieldOptions(filter.field)}
|
options={getFieldOptions(filter.field)}
|
||||||
|
|
|
@ -229,14 +229,7 @@ class QueryBuilder {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
let opts = []
|
return `${key}.${value}:${builder.preprocess(value, allPreProcessingOpts)}`
|
||||||
value.forEach(val =>
|
|
||||||
opts.push(
|
|
||||||
`${key}.${val}:${builder.preprocess(val, allPreProcessingOpts)}`
|
|
||||||
)
|
|
||||||
)
|
|
||||||
const joined = opts.join(" AND ")
|
|
||||||
return joined
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,14 +238,7 @@ class QueryBuilder {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
let opts = []
|
return `!${key}.${value}:${builder.preprocess(value, allPreProcessingOpts)}`
|
||||||
value.forEach(val =>
|
|
||||||
opts.push(
|
|
||||||
`!${key}.${val}:${builder.preprocess(val, allPreProcessingOpts)}`
|
|
||||||
)
|
|
||||||
)
|
|
||||||
const joined = opts.join(" AND ")
|
|
||||||
return joined
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue