meteor-tabular
meteor-tabular copied to clipboard
Can't access current element instance inside render function
Currently, I'm trying to put a image inside a table row. The image is part of a FilesCollection (meteor/ostrio:files), and the link to the image is returned by doing something along the following
let link = objectInstanceFromTheFileCollection.link();
in which .link() is a function from the given FilesCollection. The problem is that I can't access the current instance of data, inside the render. I want to do something like this:
{
data: "Anything that returns me the object instance in render",
title: "Image",
render (val, type, doc) {
return '<a href="'+val.link()+'">Text</a>';
},
},
Can you help me with this?
Thanks in advance.