FIX: if `args` change a connector should update

This commit is contained in:
Robin Ward 2016-12-23 12:07:01 -05:00
parent 4bc57f3686
commit 27e348c6b4
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,5 @@
import { observes } from 'ember-addons/ember-computed-decorators';
export default Ember.Component.extend({
init() {
@ -13,6 +15,12 @@ export default Ember.Component.extend({
connectorClass.setupComponent.call(this, args, this);
},
@observes('args')
_argsChanged() {
const args = this.get('args') || {};
Object.keys(args).forEach(key => this.set(key, args[key]));
},
send(name, ...args) {
const connectorClass = this.get('connector.connectorClass');
const action = connectorClass.actions[name];

View File

@ -21,7 +21,8 @@
<div class="row">
<div class="full-width">
<div id="list-area">
{{plugin-outlet name="discovery-list-container-top"}}
{{plugin-outlet name="discovery-list-container-top"
args=(hash category=category)}}
{{outlet "list-container"}}
</div>
</div>