Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabular DT Editor Integration #439

Open
smohantyCME opened this issue Nov 16, 2021 · 3 comments
Open

Tabular DT Editor Integration #439

smohantyCME opened this issue Nov 16, 2021 · 3 comments

Comments

@smohantyCME
Copy link

I’ve gotten other DT extensions to work in this Meteor wrapper by doing something like the following

In Client Side Code
e.g.

I import an extension at the top of the module as such

import scroller from 'datatables.net-scroller-bs';

Then – I apply it to the window and jQuery instance by doing the following…
scroller(window, $);

Then --- in “Common Code”
I create a DT instance using the wrapper’s constructor

I do something like the following to get an extension to load

const profilesTable = new Tabular.Table({
    name: 'Profiles',
 
    //This is basically the ajax part…(except this comes from MongoDB via Pub/Sub…feature that is specific to Meteor)
    collection: Profiles,
 
    //This configures scroller and gets it to work on client side
    scroller: {
        loadingIndicator: true
    },
 
    columns: [
      MY_COLS
    ],
 
});

I’m able to import Editor on client side by doing
import editor from 'datatables.net-editor';

However, attempting to attach it to the window and jQuery like every other DT extension doesn’t work.
editor(window, $);

Looks like this is because Editor exports a TS Class and is not a Constructor expecting those params.

@StorytellerCZ
Copy link
Member

I don't follow how is this related to MCP?

@smohantyCME
Copy link
Author

Hi, I was told that MCP took over that repo and to post issues here. Please let me know if I should move this elsewhere though. Thanks!

@StorytellerCZ
Copy link
Member

StorytellerCZ commented Dec 10, 2021

Please post this into the tabular repository, this repository is for organization discussion and issues, not for individual projects. Transferring the issue.

@StorytellerCZ StorytellerCZ transferred this issue from Meteor-Community-Packages/organization Dec 10, 2021
@StorytellerCZ StorytellerCZ reopened this Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants