Handle number 'Is in'
This commit is contained in:
parent
6d394e551d
commit
3e1bf29bcf
|
@ -102,8 +102,12 @@ export const buildLuceneQuery = filter => {
|
||||||
if (type === "datetime" && value) {
|
if (type === "datetime" && value) {
|
||||||
value = new Date(value).toISOString()
|
value = new Date(value).toISOString()
|
||||||
}
|
}
|
||||||
if (type === "number") {
|
if (type === "number" && !Array.isArray(value)) {
|
||||||
value = parseFloat(value)
|
if (operator === "oneOf") {
|
||||||
|
value = value.split(",").map(item => parseFloat(item))
|
||||||
|
} else {
|
||||||
|
value = parseFloat(value)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (type === "boolean") {
|
if (type === "boolean") {
|
||||||
value = `${value}`?.toLowerCase() === "true"
|
value = `${value}`?.toLowerCase() === "true"
|
||||||
|
@ -137,6 +141,7 @@ export const buildLuceneQuery = filter => {
|
||||||
query[operator][field] = value
|
query[operator][field] = value
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
console.log("VAL ", value)
|
||||||
query[operator][field] = value
|
query[operator][field] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue