Fix rendering of columns named topic_id
This commit is contained in:
parent
86a3d16ad4
commit
4b3188c111
|
@ -65,6 +65,10 @@ const QueryResultComponent = Ember.Component.extend({
|
||||||
});
|
});
|
||||||
}.property('content', 'columns.@each'),
|
}.property('content', 'columns.@each'),
|
||||||
|
|
||||||
|
fallbackTemplate: function() {
|
||||||
|
return this.container.lookup('template:explorer/text.raw');
|
||||||
|
}.property(),
|
||||||
|
|
||||||
columnTemplates: function() {
|
columnTemplates: function() {
|
||||||
const self = this;
|
const self = this;
|
||||||
if (!this.get('columns')) {
|
if (!this.get('columns')) {
|
||||||
|
|
|
@ -27,6 +27,7 @@ const QueryRowContentComponent = Ember.Component.extend({
|
||||||
const self = this;
|
const self = this;
|
||||||
const row = this.get('row');
|
const row = this.get('row');
|
||||||
const parent = self.get('parent');
|
const parent = self.get('parent');
|
||||||
|
const fallback = parent.get('fallbackTemplate');
|
||||||
|
|
||||||
const parts = this.get('columnTemplates').map(function(t, idx) {
|
const parts = this.get('columnTemplates').map(function(t, idx) {
|
||||||
const ctx = {};
|
const ctx = {};
|
||||||
|
@ -48,7 +49,7 @@ const QueryRowContentComponent = Ember.Component.extend({
|
||||||
ctx.value = row[idx];
|
ctx.value = row[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Handlebars.SafeString(t.template(ctx, params));
|
return new Handlebars.SafeString((t.template || fallback)(ctx, params));
|
||||||
});
|
});
|
||||||
|
|
||||||
buffer.push("<td>" + parts.join("</td><td>") + "</td>");
|
buffer.push("<td>" + parts.join("</td><td>") + "</td>");
|
||||||
|
|
Loading…
Reference in New Issue