DataTables Editor With Meteor
DataTables Editor With Meteor
I want to use the Datatables Editor with the Meteor Framework.
I am doing:
var editor = new $.fn.dataTable.Editor( {} );
I seem to be getting an error others are seeing:
ReferenceError: $ is not defined
at both/collections/RFQ.js:4:1
at both/collections/RFQ.js:232:1
at /Users/richardhsu/Desktop/sewp_tr_tool/.meteor/local/build/programs/server/boot.js:242:10
at Array.forEach (native)
at Function..each..forEach (/Users/richardhsu/.meteor/packages/meteor-tool/.1.1.10.1thygq0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /Users/richardhsu/Desktop/sewp_tr_tool/.meteor/local/build/programs/server/boot.js:137:5
Exited with code: 8
Your application is crashing. Waiting for file change.
I think for some reason jQuery isn't loading before the library is imported. Has anyone used this with Meteor and if so, where do I put dataTables.editor.js?
Answers
I also tried this block of code:
if (Meteor.isClient)
{
var editor = new $.fn.dataTable.Editor( {} );
}
This is the error:
$.fn.dataTable.Editor is not a constructor(anonymous function) @ RFQ.js:7(anonymous function) @ RFQ.js:232
debug.js:41 Exception from Tracker afterFlush function:
Anyone?
It sounds like Editor might not be loaded. Have you got a link to the page you can give me so I can help to debug it?
Allan
Hi Allan,
Thank you for your response and your outreach.
Here is the link to my code:
https://github.com/rhsu0268/Meteor
I think part of the challenge is that I'm using Meteor as my framework and pulling in the files can be challenging. Do you have anyone on your team who has used datatable-editor in the context of Meteor.
From a look at the forum, there were several people who had the same issue, and so I would think it would benefit many if instructions for how to use the datatable-editor plugin with meteor was posted somewhere on the references for the guide.
Thanks,
Richard
Hi Richard,
"My team" is me, and I'm afraid I've not used Meteor before.
Is the repo you linked to ready to run? How do I run it if so, or does it require some configuration?
Allan
Hi Allan,
First clone the project down. Then, change directory into the data-table editor.
If you have meteor installed on your machine, you can run: "meteor run" and that will run the project in development mode.
Its taken me an embarrassingly long time to get to this - sorry! I've just tried it and get:
I'm in the git repo root dir when running that command. Should I be somewhere else?
Allan