FIX: Invalid use of controller in a component
This commit is contained in:
parent
8d72e979a5
commit
f9e1177981
|
@ -167,9 +167,7 @@ const QueryResultComponent = Ember.Component.extend({
|
|||
downloadResultCsv() {
|
||||
this.downloadResult('csv');
|
||||
}
|
||||
},
|
||||
|
||||
parent: function() { return this; }.property()
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ const QueryRowContentComponent = Ember.Component.extend(bufferedRender({
|
|||
buildBuffer(buffer) {
|
||||
const self = this;
|
||||
const row = this.get('row');
|
||||
const parent = self.get('parent');
|
||||
const fallback = parent.get('fallbackTemplate');
|
||||
const parentView = self.get('parentView');
|
||||
const fallback = this.get('fallbackTemplate');
|
||||
const helpers = {
|
||||
"icon-or-image": icon_or_image_replacement,
|
||||
"category-link": category_badge_replacement,
|
||||
|
@ -54,9 +54,9 @@ const QueryRowContentComponent = Ember.Component.extend(bufferedRender({
|
|||
return esc(row[idx]);
|
||||
}
|
||||
|
||||
const lookupFunc = parent[`lookup${t.name.capitalize()}`];
|
||||
const lookupFunc = parentView[`lookup${t.name.capitalize()}`];
|
||||
if (lookupFunc) {
|
||||
ctx[t.name] = parent[`lookup${t.name.capitalize()}`](id);
|
||||
ctx[t.name] = parentView[`lookup${t.name.capitalize()}`](id);
|
||||
}
|
||||
|
||||
if (t.name === "category" || t.name === "badge" || t.name === "reltime") {
|
||||
|
|
|
@ -22,8 +22,11 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{~#each rows as |row|}}
|
||||
{{~query-row-content row=row columnTemplates=columnTemplates parent=controller}}
|
||||
{{~/each}}
|
||||
{{#each rows as |row|}}
|
||||
{{query-row-content
|
||||
row=row
|
||||
fallbackTemplate=fallbackTemplate
|
||||
columnTemplates=columnTemplates}}
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue