mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 12:35:02 +02:00
Fix List Category requests (#3938)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
|
||||
let resultQuery: DocumentQuery<Doc> = query
|
||||
$: getResultQuery(query, viewOptionsConfig, viewOptions).then((p) => {
|
||||
resultQuery = { ...p, ...query }
|
||||
resultQuery = { ...query, ...p }
|
||||
})
|
||||
|
||||
$: queryNoLookup = noLookup(resultQuery)
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
let categoryQueryOptions: Partial<FindOptions<Doc>>
|
||||
$: categoryQueryOptions = {
|
||||
...resultOptions,
|
||||
...noLookupOptions(resultOptions),
|
||||
projection: {
|
||||
...resultOptions.projection,
|
||||
_id: 1,
|
||||
@@ -132,6 +132,11 @@
|
||||
return newQuery
|
||||
}
|
||||
|
||||
function noLookupOptions (options: FindOptions<Doc>): FindOptions<Doc> {
|
||||
const { lookup, ...resultOptions } = options
|
||||
return resultOptions
|
||||
}
|
||||
|
||||
$: dispatch('content', docs)
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
Reference in New Issue
Block a user