[TSK-1474] Fix expanded creation of sub issue (#3181)

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
This commit is contained in:
Ruslan Bayandinov 2023-05-16 00:38:40 +07:00 committed by GitHub
parent 3d4e19270b
commit d137e5548c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,7 @@
import tracker from '../../../plugin'
import CreateSubIssue from './CreateSubIssue.svelte'
import SubIssueList from './SubIssueList.svelte'
import { afterUpdate } from 'svelte'
export let issue: Issue
export let projects: Map<Ref<Project>, Project>
@ -72,6 +73,14 @@
$: viewOptions = viewlet !== undefined ? getViewOptions(viewlet, $viewOptionStore) : undefined
export let focusIndex = -1
let lastIssueId: Ref<Issue>
afterUpdate(() => {
if (lastIssueId !== issue._id) {
lastIssueId = issue._id
isCreating = $draftsStore[`${issue._id}_subIssue`] !== undefined
}
})
</script>
<div class="flex-between">