Meteor-Community-Packages / meteor-tabular

Reactive datatables for large or small datasets
https://packosphere.com/aldeed/tabular
MIT License
363 stars 136 forks source link

Options as anonymous functions #232

Open illmat opened 9 years ago

illmat commented 9 years ago

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?

illmat commented 9 years ago

Several tickets could be solved with this. ( #147, #137, #115)

krawalli commented 9 years ago

+1