1
0
Fork 0
mirror of synced 2024-09-10 06:26:02 +12:00

Fixing build issue.

This commit is contained in:
mike12345567 2024-05-22 16:02:11 +01:00
parent ff8684d9b4
commit 2ed510dc90
2 changed files with 7 additions and 5 deletions

View file

@ -4,8 +4,8 @@ import {
SearchRowResponse,
SearchViewRowRequest,
RequiredKeys,
SearchFilters,
RowSearchParams,
SearchFilterKey,
} from "@budibase/types"
import { dataFilters } from "@budibase/shared-core"
import sdk from "../../../sdk"
@ -45,10 +45,7 @@ export async function searchView(
// Carry over filters for unused fields
Object.keys(body.query).forEach(key => {
const operator = key as keyof Omit<
SearchFilters,
"allOr" | "onEmptyFilter"
>
const operator = key as SearchFilterKey
Object.keys(body.query[operator] || {}).forEach(field => {
if (!existingFields.includes(db.removeKeyNumbering(field))) {
query[operator]![field] = body.query[operator]![field]

View file

@ -64,6 +64,11 @@ export interface SearchFilters {
}
}
export type SearchFilterKey = keyof Omit<
SearchFilters,
"allOr" | "onEmptyFilter" | "fuzzyOr"
>
export type SearchQueryFields = Omit<SearchFilters, "allOr" | "onEmptyFilter">
export interface SortJson {