Tags: Fix collection editor (#2080)

* Tags: Revert collection editor changes

Signed-off-by: Anna No <anna.no@xored.com>

* Tags: Revert collection editor changes

Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
Anna No 2022-06-15 19:26:03 +07:00 committed by GitHub
parent 1562adae06
commit 5a28f6294f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -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
})

View File

@ -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
}