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

Support searching and sorting on rendered field values containing joined data

Open
#162 25 comments 0 reactions 0 assignees View on GitHub
enhancement will accept pull request
Dominant language
JavaScript
Stars
360
Forks
132
PR merge metrics
No merged PRs in 30d

Description

When I try to search for some particular content in datatable, the search doesn't really work.
To give you an example:

``` js
X = new orion.collection('x', {
...
tabular: {
columns: [
{ data: "id", title: "ID" },
{ data: "creditor", title: "Creditor", render: function (val, type, doc) {
var x = Creditors.findOne(val);
if(!x)
return val + " not found";
return x.name;
}
},
]
}
```

```
TABLE:
ID -> 1010
C --> Tom Jones

SEARCH RESULTS:
"10" -> nothing
"1010" -> returns actual row
"Tom" --> nothing
"Tom Jones" --> nothing
```

So where ever I have render property, search returns nothing but also where I don't have render, search only returns result if input text is complete value, not a substring of table column content. I am subscribed to Creditors so that's not the problem.

Contributor guide

Open the contributing guide

Research direction

Start with the tabular column search and sorting behavior, using the issue's rendered `creditor` column example with joined `Creditors` data. Reproduce searches for partial IDs and rendered names such as "10" and "Tom". Done means searching and sorting work for rendered values and substring matches, including values assembled from joined data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.