Template in tableColumns from AdminConfig does not show up
Hello, I'm unable to figure out why the template: 'showProductImage' does not show in the admin table view. I'm just trying to show the image using that template (data is right there, so there's no subscription problem)
AdminConfig = {
collections: {
Products: {
color: 'red',
tableColumns: [
{ label: 'Image', name: 'productImage', template: 'showProductImage' },
{ label: 'Title', name: 'title'}
],
templates: {
new: {
name: 'adminProductsNew'
}
}
}
}
};
<template name="showProductImage">
<img src="{{actualimage}}" class="img-rounded">
</template>
//{{actualimage}} is returning this.value which shows the actual image URL if i console.log it from the helper function. But refuses to show up in the template!
Any ideas what might be causing this? Thanks.
@insaneinc01 Did you find a solution to this? I'm having the same issue. The template is not rendering at all, even with a static html label
@Victordmdb no luck! I couldn't find a solution till date. :(
Im having the same problem, even though I know where the code is:
columns = _.map collection.tableColumns, (column) ->
if column.template
createdCell = (node, cellData, rowData) ->
$(node).html ''
Blaze.renderWithData(Template[column.template], {value: cellData, doc: rowData}, node)
Any modifications I make immediately throw an error of some sort - I really dont know how to use coffeescript properly.
Same here
I think this is due to deprecation warnings in how renderWithData is being used. You should be able to get around it by replacing the contents of that if statement with:
createdCell = (node, cellData, rowData) ->
$(node).html(Blaze.toHTMLWithData Template[column.template], {value: cellData, doc: rowData})
Not really sure why the columns get rendered like this as the tabular tables code that drives this can take a template name, but this seemed like the smallest fix that gets it working again.