mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: adds support for name changes tracking
This commit is contained in:
parent
86b8f6b238
commit
b14d9529b8
2 changed files with 34 additions and 0 deletions
|
@ -60,6 +60,7 @@ export default Ember.Component.extend(UtilsMixin, PluginApiMixin, DomHelpersMixi
|
|||
content: null,
|
||||
computedContent: null,
|
||||
limitMatches: 100,
|
||||
nameChanges: false,
|
||||
|
||||
init() {
|
||||
this._super();
|
||||
|
@ -74,6 +75,14 @@ export default Ember.Component.extend(UtilsMixin, PluginApiMixin, DomHelpersMixi
|
|||
if ((this.site && this.site.isMobileDevice) || $(window).outerWidth(false) <= 420) {
|
||||
this.setProperties({ filterable: false, autoFilterable: false });
|
||||
}
|
||||
|
||||
if (this.get("nameChanges")) {
|
||||
this.addObserver(`content.@each.${this.get("nameProperty")}`, this, this._compute);
|
||||
}
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this.removeObserver(`content.@each.${this.get("nameProperty")}`, this, this._compute);
|
||||
},
|
||||
|
||||
willComputeAttributes() {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue