Showing 1 – 2 of 2 replies
ndgdev

I am having some difficulty with the […]

ndgdev PURCHASED
7 years ago
I am having some difficulty with the DataTables plugin in this theme. The basics of DataTables appears to mostly work, enhancing it with pagination, sortable columns, etc. However whatever version of DataTables is being used by FlexAdmin doesn't seem to respect the columnDefs options. I've tried to pass dataTable() columns, columnDefs for widths, classes, orderable, and a few other properties, but they all get ignored. Is there something I'm doing wrong or missing?

Example is provided below:

== Modify advanced-tables-demo.js ==
//DataTables Initialization
$(document).ready(function() {
$('#example-table').dataTable({
columnDefs : [
{className: "red", targets: 0}
]
});
});

== Add a style block to advanced-tables.html ==
<style>
.red {
background-color: red !important;
}
</style>
ndgdev
ndgdev PURCHASED
7 years ago
Did some more digging and found that it is indeed the version of DataTables that FlexAdmin is using that is causing confusion. Appears that naming between 1.9 and 1.10 changed. Although 1.10 is backwards compatible with the naming scheme used in 1.9, the inverse is not true.

Here is a relevant guide for those running into the same problem:
https://datatables.net/upgrade/1.10-convert

Having run into this problem with DataTables, I am curious what are the implications for plugin upgrades with FlexAdmin?
* Are there any plans to release official updates to FlexAdmin with new version of the various plugins?
* Any tips, pointers, pitfalls, etc for what it would take to upgrade various components?
BlackrockDigital
7 years ago
Thanks for the information with this. I will be updating this theme's plugins in the near future. Thanks for choosing Flex Admin!

To answer your questions:

* I will be updating the theme's plugins but I don't have any deadline at the moment. I'm looking to add some Gulp tasks, NPM, LESS/SASS support, and update some of the components.
* At the moment I would update your DataTables plugin from the developer website and check out the docs for the new version to see what's changed and go from there.

Hopefully this helps!