Help with data tables plugin with Meteor

Hello. Can somebody help with data tables (native) plugin. I am using Package Based Architecture approach- inspired by

In my main package (core) I add files like this:

        // ** I18 ** //
        // ** DATA TABLES ** //
        // ** METIS MENU ** //
        //** TOASTR NOTIFICATION **/
    ], 'client');

But when I want use data tables in another package (like Users, Leads etc) I get DataTable is undefined


Thank’s beforehand.

Hi there,

I really recon you to have a look at aldeed’s tabular package, which does all the work for you and works really well. Here you go - have fun with it :slight_smile:

Thank you! But if I want another JS (jquery) plugin… what I need to do to use it in other packages? I need import files of similar?

Also note, that the package-based structure is NOT recommended anymore… it was something we liked to do in the good old days of meteor. The way to do it today are ES2015 modules… check out this link here, where it is explained very well

The way to manually include datatables today (I still recon you to use aldeed:tabular) would be to do an meteor npm install datatables-package ( and then in your onRendered() you should be able to attach it to the dom

Note that aldeed:meteor-tabular package does use DataTables jQuery plugin internally and you can use all of its configuration options.

1 Like