mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -05:00
Make observing optional
This commit is contained in:
parent
969fb2cd4c
commit
5022507029
1 changed files with 4 additions and 3 deletions
|
@ -68,9 +68,10 @@ export default Ember.Component.extend({
|
||||||
o.selected = !!$(o).attr('selected');
|
o.selected = !!$(o).attr('selected');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Workaround for contentChanged not being able to observe based on
|
// observer for item names changing (optional)
|
||||||
// a passed-in attribute name
|
if (this.get('nameChanges')) {
|
||||||
this.addObserver('content.@each.' + this.get('realNameProperty'), this.rerender);
|
this.addObserver('content.@each.' + this.get('realNameProperty'), this.rerender);
|
||||||
|
}
|
||||||
|
|
||||||
$elem.select2({formatResult: this.comboTemplate, minimumResultsForSearch: 5, width: 'resolve'});
|
$elem.select2({formatResult: this.comboTemplate, minimumResultsForSearch: 5, width: 'resolve'});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue