FIX: category row title (#6597)
This commit is contained in:
parent
4a12cfaecb
commit
c1e82e7442
|
@ -20,10 +20,9 @@ export default SelectKitRowComponent.extend({
|
|||
return displayCategoryDescription;
|
||||
},
|
||||
|
||||
@computed("description", "category.name")
|
||||
title(categoryDescription, categoryName) {
|
||||
if (categoryDescription) return categoryDescription;
|
||||
return categoryName;
|
||||
@computed("descriptionText", "description", "category.name")
|
||||
title(descriptionText, description, name) {
|
||||
return descriptionText || description || name;
|
||||
},
|
||||
|
||||
@computed("computedContent.value", "computedContent.name")
|
||||
|
@ -84,12 +83,23 @@ export default SelectKitRowComponent.extend({
|
|||
return displayCategoryDescription && description && description !== "null";
|
||||
},
|
||||
|
||||
@computed("category.description_text")
|
||||
descriptionText(description) {
|
||||
if (description) {
|
||||
return this._formatCategoryDescription(description);
|
||||
}
|
||||
},
|
||||
|
||||
@computed("category.description")
|
||||
description(description) {
|
||||
if (description) {
|
||||
return `${description.substr(0, 200)}${
|
||||
description.length > 200 ? "…" : ""
|
||||
}`;
|
||||
return this._formatCategoryDescription(description);
|
||||
}
|
||||
},
|
||||
|
||||
_formatCategoryDescription(description) {
|
||||
return `${description.substr(0, 200)}${
|
||||
description.length > 200 ? "…" : ""
|
||||
}`;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue