1
0
Fork 0
mirror of synced 2024-07-08 15:56:23 +12:00

Fix lucene not allowed characters

This commit is contained in:
Peter Clement 2021-08-26 11:39:42 +01:00
parent 4cfcae415e
commit f7ebf7f8a4
3 changed files with 3 additions and 7 deletions

View file

@ -34,11 +34,7 @@
{:else if type === "boolean"} {:else if type === "boolean"}
<Toggle text={label} bind:value data-cy="{meta.name}-input" /> <Toggle text={label} bind:value data-cy="{meta.name}-input" />
{:else if type === "array"} {:else if type === "array"}
<Multiselect <Multiselect bind:value {label} options={meta.constraints.inclusion.flat()} />
bind:value
{label}
options={meta.constraints.inclusion.reduce((p, n) => p.concat(n), [])}
/>
{:else if type === "link"} {:else if type === "link"}
<LinkedRowSelector bind:linkedRows={value} schema={meta} /> <LinkedRowSelector bind:linkedRows={value} schema={meta} />
{:else if type === "longform"} {:else if type === "longform"}

View file

@ -62,7 +62,7 @@
} }
// if changed to an array, change default value to empty array // if changed to an array, change default value to empty array
const idx = filters.findIndex(x => (x.field = field)) const idx = filters.findIndex(x => x.field === field)
if (expression.type === "array") { if (expression.type === "array") {
filters[idx].value = [] filters[idx].value = []
} else { } else {

View file

@ -133,7 +133,7 @@ class QueryBuilder {
} }
// Escape characters // Escape characters
if (escape && originalType === "string") { if (escape && originalType === "string") {
value = `${value}`.replace(/[ #+\-&|!{}\]^"~*?:\\]/g, "\\$&") value = `${value}`.replace(/[ #+\-&|!(){}\]^"~*?:\\]/g, "\\$&")
} }
// Wrap in quotes // Wrap in quotes
if (hasVersion && wrap) { if (hasVersion && wrap) {