FIX: if `args` change a connector should update
This commit is contained in:
parent
4bc57f3686
commit
27e348c6b4
|
@ -1,3 +1,5 @@
|
||||||
|
import { observes } from 'ember-addons/ember-computed-decorators';
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
@ -13,6 +15,12 @@ export default Ember.Component.extend({
|
||||||
connectorClass.setupComponent.call(this, args, this);
|
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) {
|
send(name, ...args) {
|
||||||
const connectorClass = this.get('connector.connectorClass');
|
const connectorClass = this.get('connector.connectorClass');
|
||||||
const action = connectorClass.actions[name];
|
const action = connectorClass.actions[name];
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="full-width">
|
<div class="full-width">
|
||||||
<div id="list-area">
|
<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"}}
|
{{outlet "list-container"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue