mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
Empty category fix (#2627)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
32f1f80d5f
commit
17421a18b2
@ -52,6 +52,9 @@
|
||||
let categories: any[] = []
|
||||
$: updateCategories(_class, docs, groupByKey, viewOptions, viewOptionsConfig)
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
|
||||
const queryId = generateId()
|
||||
onDestroy(() => {
|
||||
CategoryQuery.remove(queryId)
|
||||
@ -75,7 +78,7 @@
|
||||
const categoryFunc = viewOption as CategoryOption
|
||||
if (viewOptions[viewOption.key] ?? viewOption.defaultValue) {
|
||||
const f = await getResource(categoryFunc.action)
|
||||
const res = await f(_class, space, groupByKey, update, queryId)
|
||||
const res = hierarchy.clone(await f(_class, space, groupByKey, update, queryId))
|
||||
if (res !== undefined) {
|
||||
for (const category of categories) {
|
||||
if (!res.includes(category)) {
|
||||
@ -90,8 +93,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
const client = getClient()
|
||||
|
||||
let itemModels: AttributeModel[]
|
||||
|
||||
function getHeader (_class: Ref<Class<Doc>>, groupByKey: string): void {
|
||||
|
Loading…
Reference in New Issue
Block a user