meteor-tabular icon indicating copy to clipboard operation
meteor-tabular copied to clipboard

Can't access current element instance inside render function

Open vischnabel opened this issue 7 years ago • 0 comments

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.

vischnabel avatar Mar 21 '18 14:03 vischnabel