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