Meteor-Community-Packages / Meteor-Community-Packages/meteor-tabular
Can't access current element instance inside render function
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 360
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
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 'Text';
},
},
```
Can you help me with this?
Thanks in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by tracing the table column render callback and checking what its val, type, and doc arguments contain for a row. Done means the render function can access the current FilesCollection instance and use its link() method to produce the image link.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100