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'),
|
||||
|
||||
fallbackTemplate: function() {
|
||||
return this.container.lookup('template:explorer/text.raw');
|
||||
}.property(),
|
||||
|
||||
columnTemplates: function() {
|
||||
const self = this;
|
||||
if (!this.get('columns')) {
|
||||
|
|
|
@ -27,6 +27,7 @@ const QueryRowContentComponent = Ember.Component.extend({
|
|||
const self = this;
|
||||
const row = this.get('row');
|
||||
const parent = self.get('parent');
|
||||
const fallback = parent.get('fallbackTemplate');
|
||||
|
||||
const parts = this.get('columnTemplates').map(function(t, idx) {
|
||||
const ctx = {};
|
||||
|
@ -48,7 +49,7 @@ const QueryRowContentComponent = Ember.Component.extend({
|
|||
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>");
|
||||
|
|
Loading…
Reference in New Issue