tr classes and data attributes not present when importing select plugin

tr classes and data attributes not present when importing select plugin

mikele3mikele3 Posts: 4Questions: 2Answers: 0

Link to test case:
I do not have a test case online

Debugger code (debug.datatables.net):
all is up to date and 16 tests complete. No failures or warnings found!

Error messages shown:
none

Description of problem:
I have a table that works perfectly.
The <tr> have classes for odd and even rows and data attributes, which I apply like this:
const row = this.naviDatatable.rows.add([rowData]).nodes().to$();
row.attr('data-id', id).attr('data-items', JSON.stringify(design.items));

as soon as I add to my script: import 'datatables.net-select-dt';
and I reload the page, the <tr> have no classes and no attributes...
Selecting rows work nicely though

is that the expected behavior?
how can I retain my data attributes and the striped rows?

Thank you in advance for any input on this....

Answers

  • allanallan Posts: 63,290Questions: 1Answers: 10,428 Site admin

    Sorry I didn't manage to answer this at the time. As noted in the forum rules, providing a test case is required and it helps a lot to be able to diagnose the issue.

    Your repost is here and I've provided a link to an example showing it working. Let's continue the discussion in that thread.

    Allan

  • mikele3mikele3 Posts: 4Questions: 2Answers: 0

    Thank you Allan.
    I will continue the discussion on the other thread.
    I really appreciate you getting back to me about this.

Sign In or Register to comment.