Fixed label name not showing as title (#20275)

ref DES-205
This commit is contained in:
Sodbileg Gansukh 2024-05-29 15:56:24 +08:00 committed by GitHub
parent fb465e4704
commit 9099ab47c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,17 @@
import DraggableObject from 'ember-drag-drop/components/draggable-object';
import classic from 'ember-classic-decorator';
import {alias} from '@ember/object/computed';
import {attributeBindings, classNames} from '@ember-decorators/component';
import {computed} from '@ember/object';
@classic
@attributeBindings('title')
@classNames('label-token')
export default class LabelToken extends DraggableObject {
title = this.name ?? 'Label';
@alias('content.name') name;
@computed('name')
get title() {
return this.name ?? 'Label';
}
}