mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: various issues when editing category permissions
This commit also adds multiple tests
This commit is contained in:
parent
c22f202e10
commit
49b1df40fc
5 changed files with 127 additions and 12 deletions
|
@ -61,6 +61,7 @@ export default Ember.Component.extend(UtilsMixin, PluginApiMixin, DomHelpersMixi
|
|||
computedContent: null,
|
||||
limitMatches: 100,
|
||||
nameChanges: false,
|
||||
allowsContentReplacement: false,
|
||||
|
||||
init() {
|
||||
this._super();
|
||||
|
@ -79,10 +80,15 @@ export default Ember.Component.extend(UtilsMixin, PluginApiMixin, DomHelpersMixi
|
|||
if (this.get("nameChanges")) {
|
||||
this.addObserver(`content.@each.${this.get("nameProperty")}`, this, this._compute);
|
||||
}
|
||||
|
||||
if (this.get("allowsContentReplacement")) {
|
||||
this.addObserver(`content.[]`, this, this._compute);
|
||||
}
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this.removeObserver(`content.@each.${this.get("nameProperty")}`, this, this._compute);
|
||||
this.removeObserver(`content.[]`, this, this._compute);
|
||||
},
|
||||
|
||||
willComputeAttributes() {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue