Fix build
This commit is contained in:
parent
38f7b88735
commit
288d48c60d
|
@ -310,16 +310,12 @@ export const buildQuery = (filter: SearchFilter[]) => {
|
|||
query.equal = query.equal || {}
|
||||
query.equal[field] = true
|
||||
} else {
|
||||
query[queryOperator] = {
|
||||
...query[queryOperator],
|
||||
[field]: value,
|
||||
}
|
||||
query[queryOperator] ??= {}
|
||||
query[queryOperator]![field] = value
|
||||
}
|
||||
} else {
|
||||
query[queryOperator] = {
|
||||
...query[queryOperator],
|
||||
[field]: value,
|
||||
}
|
||||
query[queryOperator] ??= {}
|
||||
query[queryOperator]![field] = value
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -21,7 +21,7 @@ export enum InternalSearchFilterOperator {
|
|||
COMPLEX_ID_OPERATOR = "_complexIdOperator",
|
||||
}
|
||||
|
||||
type BasicFilter = Record<string, string> & {
|
||||
type BasicFilter<T = any> = Record<string, T> & {
|
||||
[InternalSearchFilterOperator.COMPLEX_ID_OPERATOR]?: never
|
||||
}
|
||||
|
||||
|
@ -52,8 +52,8 @@ export interface SearchFilters {
|
|||
// allows just fuzzy to be or - all the fuzzy/like parameters
|
||||
fuzzyOr?: boolean
|
||||
onEmptyFilter?: EmptyFilterOption
|
||||
[SearchFilterOperator.STRING]?: BasicFilter
|
||||
[SearchFilterOperator.FUZZY]?: BasicFilter
|
||||
[SearchFilterOperator.STRING]?: BasicFilter<string>
|
||||
[SearchFilterOperator.FUZZY]?: BasicFilter<string>
|
||||
[SearchFilterOperator.RANGE]?: RangeFilter
|
||||
[SearchFilterOperator.EQUAL]?: BasicFilter
|
||||
[SearchFilterOperator.NOT_EQUAL]?: BasicFilter
|
||||
|
|
Loading…
Reference in New Issue