From ebe5fcdfbe7daea35409eff58d8de0c6f999f93e Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Sat, 13 Jan 2024 16:48:29 +0300 Subject: [PATCH] Fixed creation of class attribute (#4350) Signed-off-by: Alexander Platov --- .../src/components/ClassAttributes.svelte | 2 +- .../src/components/CreateAttribute.svelte | 2 +- .../src/components/projectTypes/ProjectEditor.svelte | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/setting-resources/src/components/ClassAttributes.svelte b/plugins/setting-resources/src/components/ClassAttributes.svelte index d7d04aeb52..0cfb3b8844 100644 --- a/plugins/setting-resources/src/components/ClassAttributes.svelte +++ b/plugins/setting-resources/src/components/ClassAttributes.svelte @@ -74,7 +74,7 @@ export function createAttribute (ev: MouseEvent): void { showPopup(TypesPopup, { _class }, getEventPositionElement(ev), (_id) => { - if (_id !== undefined) $settingsStore = { component: CreateAttribute, props: { _id, _class } } + if (_id !== undefined) $settingsStore = { component: CreateAttribute, props: { selectedType: _id, _class } } }) } diff --git a/plugins/setting-resources/src/components/CreateAttribute.svelte b/plugins/setting-resources/src/components/CreateAttribute.svelte index 8801bac7b0..83916f2153 100644 --- a/plugins/setting-resources/src/components/CreateAttribute.svelte +++ b/plugins/setting-resources/src/components/CreateAttribute.svelte @@ -77,7 +77,7 @@ } const items = getTypes() - let selectedType: Ref>> + export let selectedType: Ref>> | undefined = undefined $: selectedType && selectType(selectedType) diff --git a/plugins/task-resources/src/components/projectTypes/ProjectEditor.svelte b/plugins/task-resources/src/components/projectTypes/ProjectEditor.svelte index abe085963c..e22fd59a92 100644 --- a/plugins/task-resources/src/components/projectTypes/ProjectEditor.svelte +++ b/plugins/task-resources/src/components/projectTypes/ProjectEditor.svelte @@ -210,14 +210,14 @@ - - + - + -->
{#if selectedTaskTypeId === undefined}