From 5a28f6294f6dd61c0ab005db5a33a9de2a66c8d5 Mon Sep 17 00:00:00 2001 From: Anna No Date: Wed, 15 Jun 2022 19:26:03 +0700 Subject: [PATCH] Tags: Fix collection editor (#2080) * Tags: Revert collection editor changes Signed-off-by: Anna No * Tags: Revert collection editor changes Signed-off-by: Anna No --- models/tags/src/index.ts | 4 ++++ .../presentation/src/components/AttributeBarEditor.svelte | 8 +------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/models/tags/src/index.ts b/models/tags/src/index.ts index 8017368ac4..1bef22ad8a 100644 --- a/models/tags/src/index.ts +++ b/models/tags/src/index.ts @@ -88,6 +88,10 @@ export function createModel (builder: Builder): void { builder.createModel(TTagElement, TTagReference, TTagCategory) builder.mixin(tags.class.TagReference, core.class.Class, view.mixin.CollectionEditor, { + editor: tags.component.Tags + }) + + builder.mixin(tags.class.TagReference, core.class.Class, view.mixin.AttributeEditor, { editor: tags.component.TagsAttributeEditor }) diff --git a/packages/presentation/src/components/AttributeBarEditor.svelte b/packages/presentation/src/components/AttributeBarEditor.svelte index 1057ac9462..a9dd3664eb 100644 --- a/packages/presentation/src/components/AttributeBarEditor.svelte +++ b/packages/presentation/src/components/AttributeBarEditor.svelte @@ -45,13 +45,7 @@ return } const category = presenterClass.category - let mixinRef = undefined - if (category === 'attribute') { - mixinRef = view.mixin.AttributeEditor - } - if (category === 'collection') { - mixinRef = view.mixin.CollectionEditor - } + let mixinRef = view.mixin.AttributeEditor if (category === 'array') { mixinRef = view.mixin.ArrayEditor }