diff --git a/app/components/mixin-detail.js b/app/components/mixin-detail.js index 305ff7b38a..4a2e0b4459 100644 --- a/app/components/mixin-detail.js +++ b/app/components/mixin-detail.js @@ -1,6 +1,6 @@ import Ember from "ember"; const { computed, Component } = Ember; -const { readOnly } = computed; +const { readOnly, sort } = computed; export default Component.extend({ /** @@ -17,6 +17,22 @@ export default Component.extend({ return this.get('model.expand') && this.get('model.properties.length') > 0; }), + /** + * Used by the `sort` computed macro. + * + * @property sortProperties + * @type {Array} + */ + sortProperties: ['name'], + + /** + * Sort the properties by name to make them easier to find in the object inspector. + * + * @property sortedProperties + * @type {Array} + */ + sortedProperties: sort('model.properties', 'sortProperties'), + actions: { calculate({ name }) { let objectId = this.get('objectId'); diff --git a/app/templates/components/mixin-details.hbs b/app/templates/components/mixin-details.hbs index e330e96474..55be88564b 100644 --- a/app/templates/components/mixin-details.hbs +++ b/app/templates/components/mixin-details.hbs @@ -25,7 +25,7 @@ {{/if}} {{#if mixin.isExpanded}}