Meteor-Community-Packages / Meteor-Community-Packages/meteor-tabular

Can't access current element instance inside render function

Open
#413 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.