Fix build on view search
This commit is contained in:
parent
98d9f52f66
commit
1e6bb7ebd7
|
@ -6,6 +6,7 @@ import {
|
|||
RequiredKeys,
|
||||
RowSearchParams,
|
||||
SearchFilterKey,
|
||||
LogicalOperator,
|
||||
} from "@budibase/types"
|
||||
import { dataFilters } from "@budibase/shared-core"
|
||||
import sdk from "../../../sdk"
|
||||
|
@ -48,10 +49,18 @@ export async function searchView(
|
|||
// Carry over filters for unused fields
|
||||
Object.keys(body.query).forEach(key => {
|
||||
const operator = key as SearchFilterKey
|
||||
|
||||
Object.keys(body.query[operator] || {}).forEach(field => {
|
||||
if (!existingFields.includes(db.removeKeyNumbering(field))) {
|
||||
if (
|
||||
operator === LogicalOperator.AND ||
|
||||
operator === LogicalOperator.OR
|
||||
) {
|
||||
// TODO
|
||||
} else {
|
||||
query[operator]![field] = body.query[operator]![field]
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue