Fix/tsk 218 (#2335)

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
This commit is contained in:
Ruslan Bayandinov 2022-10-28 20:44:33 +07:00 committed by GitHub
parent 2c681a88a9
commit fd13e7f446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -916,7 +916,7 @@ export function createModel (builder: Builder): void {
component: tracker.component.SetParentIssueActionPopup,
element: 'top',
fillProps: {
_object: 'value'
_objects: 'value'
}
},
label: tracker.string.SetParent,

View File

@ -547,7 +547,14 @@ export class LiveQuery extends TxProcessor implements Client {
if (q.result instanceof Promise) {
q.result = await q.result
}
q.result.push(res[0])
const doc = res[0]
const pos = q.result.findIndex((el) => el._id === doc._id)
if (pos !== -1) {
q.result[pos] = doc
} else {
q.result.push(doc)
q.total++
}
return true
}
}

View File

@ -221,6 +221,8 @@ async function ShowPopup (
}
if (docKey === '_object') {
;(cprops as any)[propKey] = docs[0]
} else if (docKey === '_objects') {
;(cprops as any)[propKey] = docs.length === 1 ? docs[0] : docs
}
}