Meteor-Community-Packages / Meteor-Community-Packages/meteor-tabular
Options as anonymous functions
- Dominant language
- JavaScript
- Stars
- 360
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
I just had a little discussion with an datatables author.
https://github.com/DataTables/DataTables/pull/713
Basically, I want pass anonymous functions as options.
For example:
```
language: {
url: function () {
return '/getDataTableLanguageFile/' + TAPi18n.getLanguage();
}
}
```
or
```
title: function () {
if (Meteor.isClient) {
return TAPi18n.__('From');
}
return 'From';
}
```
It works like a charm with the PR I've submitted there.
They won't implement this at the moment.
Would you mind if we implement this in your package?
Contributor guide
Research direction
Start by tracing how meteor-tabular passes DataTables options into the package, then compare the requested behavior with DataTables pull request #713. Done means options such as language.url and title accept anonymous functions and produce the values shown in the examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100