Tabulator: Tabulator is not defined

Created on 17 Jan 2019  路  6Comments  路  Source: olifolkerd/tabulator

I am using Tabulator in a Backbonejs app
and when i try to load it dynamically and attach it to a div
using the test example data and code
all i get is "Tabulator is not defined" whether i use the jquery wrapper or the vanilla version on it's own

Most helpful comment

Not understanding, as of 4.0+ it by default is vanilla js. If you want to use 4.0+ with jQuery you need the jQuery wrapper(jquery_wrapper.js ):
http://tabulator.info/docs/4.1/install#setup-jquery

All 6 comments

Please post your code and make sure you format it with the <> code brackets which you can find when you comment here

it's in a proprietary app , i am using console to execute the js part and loading css dynamically

Hi @ikyaqoob, I believe there is lots of possible reasons that you got the message, for example, you might not require the tabulator.js file in right way. We can not help you if there is no more clue.
Furthermore, it looks like not be a tabulator's bug and you should try to ask it in stackoverflow.

Hi folks i found the issue ,
let me show you what I have done and what it was

/* Tabulator v4.1.5 (c) Oliver Folkerd */

;(function (global, factory) {
if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined') {
module.exports = factory();
} else if (typeof define === 'function' && define.amd) {
define(factory);
window.Tabulator = factory();
} else {
global.Tabulator = factory();
window.Tabulator = factory();
}
})(this, function () {

'use strict';

// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex

>

I was using backbone and the problem is it loads jquery dynamically using require so even though you can access it as $() but when the code above looks for it it find that dynamic object and attach to it but it's not accessible so that's why Tabulator is not defined and $(.....)Tabulator is not a function fiasco

i make it work by assigning it to window global
i would suggest if owner can separate it in to two js one for jquery and one for vanilla js
it's a great library and i think it would be more accessible to the community

Not understanding, as of 4.0+ it by default is vanilla js. If you want to use 4.0+ with jQuery you need the jQuery wrapper(jquery_wrapper.js ):
http://tabulator.info/docs/4.1/install#setup-jquery

@aklaver is right, you should be using the jQuery setup process if you want to use jQuery with the project.

Could i ask that in future you ask questions on Stack Overflow. This issues list is reserved for Bug reports and Feature requests only.

Cheers

Oli :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomheaps picture tomheaps  路  3Comments

soo1025 picture soo1025  路  3Comments

andreivanea picture andreivanea  路  3Comments

mconnelley picture mconnelley  路  3Comments

jiaqianliCn picture jiaqianliCn  路  3Comments