DataTables 1.10.25 breaks table-striped
DataTables 1.10.25 breaks table-striped
aklietz
Posts: 8Questions: 0Answers: 0
in Bug reports
DataTables 1.10.25 broke <table class="table-striped">
with Bootstrap 5.
table.dataTable.table-striped tr.odd {
background-color: #f9f9f9 !important;
}
.table-striped > tbody > tr:nth-of-type(odd) {
--bs-table-accent-bg: none !important;
}
The !important
tags break table-hover
and row selection. It also breaks highlighting a row in Editor (the row disappears).
The !important
tags only appear in the concatenated datatables.css
and the minified datatables.min.css
generated by the Download Builder. They do not appear in the original source css folder DataTables-1.10.25/css
.
Replies
I'm not clear what you mean, Editor appears to be working fine here with that CSS: http://live.datatables.net/pehutujo/1/edit
Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.
Cheers,
Colin
I created a test case at http://live.datatables.net/cabonuwe/1/edit
Click on the odd-numbered rows and they disappear.
The problem is unique to Bootstrap 5.
The problem is with RowGroup 1.1.3, specifically
rowGroup.bootstrap.css
:By the way, creating the example was not easy. The JSBin library menu does not support BS5 so I had to figure out all the CDN links by trial and error. The console does not report 404s so I had to construct the whole example offline and then paste it back into JSBin to get it to work.
The bad file is
rowGroup.bootstrap5.css
(corrected).Thanks for that test case, I'm seeing it to. The easiest way to create the package is on the download page - there it's just a few clicks to get the required packages - see your example here with the generated package : http://live.datatables.net/tanejuwu/1/edit
I've raised it internally (DD-1999 for my reference) and we'll report back here when there's an update.
Cheers,
Colin
Thanks for letting us know about this. I've committed the fix here. The nightly will be up-to-date with the change soon.
Allan
Thank you!
I have downloaded the fix from the nightly but it doesn't help. Creating the package from the downloadpage doesn't solve the problem either. I am not using rowGroup and still have the issue
The same problem occurs with Select2: the selected list appears behind the editormodal and therefore partly invisible
@Ficos , could you update the test case in my last message to demonstrate the issue, please, as we're not seeing it here. It'll help to make sure we're both looking at the same thing!
Colin
testcase
I sm not even using RowGroup, just a simple table. Problem is table-striped.
I removed line 29, but it doesn't help. Table-striped still causes the problem
Your test case is prompting for a login.
Not seeing your Datatables initialization in the above code snippet. Are you saying you don't want the striped table? If so remove
table-striped
from yourtable
element.If you still need help please provide the login info and the problem description and how to recreate the problem.
Kevin
sorry, this is without login
I DO want the striped table. The problem is that every striped row disappears when selected.
You are still loading the rowGroup library (.css and .js). Try adjusting the Datatables includes to just the extensions you are using, ie, remove RowGroup and the others to avoid any conflicts.
Take a look at this example:
http://live.datatables.net/zikuceri/1/edit
Its not using RowGroup and has
rowGroup.bootstrap5.min.css
commented out. Uncomment it and you will see the same issue.Kevin
I am sorry, I can't see where I am loading these.
in this test i removed all css-links except
-<link rel="stylesheet" type="text/css" href="../library_b5/datatables.min.css" />
The problem still occurs....
datatables.min.css comes from the downloadpage and I performed download even without RowGroup
Changing to
solved the problem. Instead of 1 css-file (datatables.css) as suggested on the downloadpage I have to put in the individual files....