-
Notifications
You must be signed in to change notification settings - Fork 57
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
cant update active/selected row background color for datatables #811
Comments
Apparently datatables has moved to using box-shadow for selected rows. This works:
|
What may be happening here is that the latest version of DT will now correctly recognize that bslib is using Bootstrap 5 and will automatically apply the BS5 styles to datatables (where previously it was using BS4 styles). I vaguely remember seeing that the newer BS5 styles used Here are the rules I've used to change the default datatables styles for bslib/inst/builtin/bs5/shiny/tables/_rules.scss Lines 9 to 35 in ad946ca
|
Thanks! I would expect something like this to work, but it has no effect:
Changing |
Yeah, only the The rules here in bslib are essentially a patch for behavior that should be implemented upstream in DT. I opened an issue there that covers some of this behavior, I'll add a note there: rstudio/DT#1081 |
Updating
table-active-bg
has no effect for preset of "shiny" or "bootstrap", whiletable-color
does work, for instance. See reprex:Noticing also that there may be mixed use of
selected
andactive
classes when selecting datatable rows. Not sure which is the right one. I'm using the following code fromtables/_rules.scss
as reference to make me think I should updatetable-active-bg
:The text was updated successfully, but these errors were encountered: