FIX: makes sure category desc is displayed as row title when possible

This commit is contained in:
Joffrey JAFFEUX 2018-03-27 12:25:05 +02:00 committed by GitHub
parent 37fa843efc
commit f81af74ad8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,12 @@ export default SelectKitRowComponent.extend({
return displayCategoryDescription;
},
@computed("description", "category.name")
title(categoryDescription, categoryName) {
if (categoryDescription) return categoryDescription;
return categoryName;
},
@computed("computedContent.value", "computedContent.name")
category(value, name) {
if (Ember.isEmpty(value)) {