diff --git a/app/assets/javascripts/discourse/components/edit-category-security.js.es6 b/app/assets/javascripts/discourse/components/edit-category-security.js.es6 index 05b1f025155..83d658564d9 100644 --- a/app/assets/javascripts/discourse/components/edit-category-security.js.es6 +++ b/app/assets/javascripts/discourse/components/edit-category-security.js.es6 @@ -20,6 +20,8 @@ export default buildCategoryPanel('security', { permission: PermissionType.create({ id: parseInt(id) }) }); } + + this.set('selectedGroup', this.get('category.availableGroups.firstObject')); }, removePermission(permission) { diff --git a/app/assets/javascripts/select-box-kit/components/select-box-kit.js.es6 b/app/assets/javascripts/select-box-kit/components/select-box-kit.js.es6 index 6247aea505c..486b39bd701 100644 --- a/app/assets/javascripts/select-box-kit/components/select-box-kit.js.es6 +++ b/app/assets/javascripts/select-box-kit/components/select-box-kit.js.es6 @@ -481,12 +481,13 @@ export default Ember.Component.extend(UtilsMixin, DomHelpersMixin, KeyboardMixin const none = isNone(this.get("none")); const emptyValue = isEmpty(this.get("value")); - const notEmptyContent = !isEmpty(this.get("content")); - if (none && emptyValue && notEmptyContent) { + if (none && emptyValue) { Ember.run.scheduleOnce("sync", () => { - const firstValue = this.get(`content.0.${this.get("valueAttribute")}`); - this.set("value", firstValue); + if (!isEmpty(this.get("computedContent"))) { + const firstValue = this.get("computedContent.firstObject.value"); + this.set("value", firstValue); + } }); } }