-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Migration/3.0 #459
base: master
Are you sure you want to change the base?
Migration/3.0 #459
Conversation
My test repo that does not accept async selector function on the server : https://github.com/dokithonon/meteor-test-async |
It seems that changing this line 92 in server/main.js
is sufficient to make it work. What do you think ? |
By doing this we can use async function in the selector function on the server
await selector, allow, changeSelector & customSearch functions in case they are async.
Migration/3.0 - observeChangesAsync
…t issues with datatables on client
@dokithonon @lynchem @ricaragao @p-wieser the latest rc (rc.4) now supports any datatables setup you want and does no hard-pinning anymore. This is because, some might use dt + Bootstrap 3, other + Bootstrap 4 or 5 and others something entirely different. Additionally: importing and initializing Datatables 2 is not working the way DT 1 does. In order to have everyhting worked out correctly, you need to first import Datatables, then "initialize" Tabular. datatables.net 1.ximport Tabular from 'meteor/aldeed:tabular'
import { $ } from 'meteor/jquery';
// Bootstrap Theme
import dataTablesBootstrap from 'datatables.net-bs';
import 'datatables.net-bs/css/dataTables.bootstrap.css';
// Buttons Core
import dataTableButtons from 'datatables.net-buttons-bs';
// Import whichever buttons you are using
import columnVisibilityButton from 'datatables.net-buttons/js/buttons.colVis.js';
import html5ExportButtons from 'datatables.net-buttons/js/buttons.html5.js';
import flashExportButtons from 'datatables.net-buttons/js/buttons.flash.js';
import printButton from 'datatables.net-buttons/js/buttons.print.js';
// Then initialize everything you imported
dataTablesBootstrap(window, $);
dataTableButtons(window, $);
columnVisibilityButton(window, $);
html5ExportButtons(window, $);
flashExportButtons(window, $);
printButton(window, $);
Tabular.init() // no args datatables.net >= 2.xYou need to have Meteor to recompile the packages: {
...
"meteor": {
...
"nodeModules": {
"recompile": {
"datatables.net": ["client", "legacy"],
"datatables.net-bs": ["client", "legacy"],
"datatables.net-buttons": ["client", "legacy"],
"datatables.net-buttons-bs": ["client", "legacy"]
}
}
}
} import Tabular from 'meteor/aldeed:tabular'
// Bootstrap Theme
import DataTables from 'datatables.net-bs';
import 'datatables.net-bs/css/dataTables.bootstrap.css';
// Buttons Core
import 'datatables.net-buttons-bs';
// Import whichever buttons you are using
import 'datatables.net-buttons/js/buttons.colVis.js';
import 'datatables.net-buttons/js/buttons.html5.js';
import 'datatables.net-buttons/js/buttons.print.js';
Tabular.init({ DataTables }) // pass DT constructor Note, that this example may use different DT libraries than your setup needs. |
Everything that's left to get this package fully compatible with Meteor 3