Merge remote-tracking branch 'origin/v3-ui' into feature/automation-branching-ux
This commit is contained in:
commit
9835e95236
|
@ -3,6 +3,8 @@ import {
|
||||||
LogicalOperator,
|
LogicalOperator,
|
||||||
Row,
|
Row,
|
||||||
RowSearchParams,
|
RowSearchParams,
|
||||||
|
SearchFilter,
|
||||||
|
SearchFilterGroup,
|
||||||
SearchFilterKey,
|
SearchFilterKey,
|
||||||
SearchFilters,
|
SearchFilters,
|
||||||
SearchResponse,
|
SearchResponse,
|
||||||
|
@ -91,11 +93,12 @@ export async function search(
|
||||||
|
|
||||||
if (!isExternalTable && !(await features.flags.isEnabled("SQS"))) {
|
if (!isExternalTable && !(await features.flags.isEnabled("SQS"))) {
|
||||||
// Lucene does not accept conditional filters, so we need to keep the old logic
|
// Lucene does not accept conditional filters, so we need to keep the old logic
|
||||||
const query: SearchFilters = viewQuery
|
const query: SearchFilters = viewQuery || {}
|
||||||
|
const viewFilters = view.query as SearchFilter[]
|
||||||
|
|
||||||
// Extract existing fields
|
// Extract existing fields
|
||||||
const existingFields =
|
const existingFields =
|
||||||
view.query
|
viewFilters
|
||||||
?.filter(filter => filter.field)
|
?.filter(filter => filter.field)
|
||||||
.map(filter => db.removeKeyNumbering(filter.field)) || []
|
.map(filter => db.removeKeyNumbering(filter.field)) || []
|
||||||
|
|
||||||
|
@ -112,7 +115,7 @@ export async function search(
|
||||||
} else {
|
} else {
|
||||||
options.query = {
|
options.query = {
|
||||||
$and: {
|
$and: {
|
||||||
conditions: [viewQuery, options.query],
|
conditions: [viewQuery as SearchFilterGroup, options.query],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue