npm - select extension removes stripes
npm - select extension removes stripes
I have tried to ask this before but got no replies, I still need help, so I try again.
I use Webpack 5.93.0 to minify and bundle my scripts.
I use DataTables in my scripts importing it like this:
import DataTables from 'datatables.net-dt';
Works like a charm.
In a particular script, I want to use the select extension, so I add this line:
import 'datatables.net-select-dt';
When I do that, DataTables and select work fine, but without zebra striping
I have tried to force stripes back like this:
createdRow: function (row, data, dataIndex) {
$(row).addClass(dataIndex % 2 ? 'odd' : 'even');
}
but it is limiting, it doesn't refresh when the table filter or sort.
I am using DataTables 2.1.4 and Select 2.0.5
I do not see any error in console or in the DataTables debugger
What am I missing?
Answers
It seems to work no problem here.
I've used Vite rather than Webpack, but I doubt that should make a difference.
Perhaps you can create a test case or minimal git repo that demonstrates the issue so I can take a look at it please?
Allan
Thanks Allan, it will take me some time, but I will do that.
The issue I am having is in a Wordpress plugin I am developing.
I am victim of deadlines at the moment, but I will take the time to setup a Wordpress website with a minimal setup to recreate the issue, and share a git repo to that plugin here.
Thanks again for getting back to me on this.